import java.util.Scanner;
public class At2 {
	static Scanner in = new Scanner(System.in);

	static int ni() {
		return in.nextInt();
	}

	static String nl() {
		return in.nextLine();
	}

	public static void main(String[] args) {
		int n = ni();
		int d = (int)Math.round(n*1.0/3);
		int f = d/12;
		d = d - f*12;
		System.out.println(f + " " + d);
	}
}
