import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class ProblemA {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		new ProblemA();
	}

	public ProblemA() throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintStream out = System.out;
		StringTokenizer tok = new StringTokenizer(in.readLine());
		double n = Integer.parseInt(tok.nextToken());
		int duims = (int) Math.round(n / 3);
		int foots = duims / 12;
		duims %= 12;
		out.println(foots + " " + duims);
		out.close();
	}

}
