import java.io.*;
import java.util.*;
public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out=new PrintWriter(System.out);
		int x=Integer.parseInt(in.readLine());
		long foot=x/36;
		x=x%36;
		long inch=Math.round((double)x/3);
		out.println(foot+" "+inch);
		out.close();
	}

}
