import java.util.Scanner;

public class Test2A {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		System.out.print(((n + 1) / 36) + " ");
		if (n / 36 != (n + 1) / 36) {
			System.out.print(0);
		} else {
			System.out.print(((n % 36) + 1) / 3);
		}
	}
}
