import  java.util.Scanner;
public class Solution {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a;
        int b;
        b = n / 3;
        a = b / 12;
        b %= 12;
        if ((n - a * 36) % 3 == 2) {
            b = (n - a * 36) / 3 + 1;
        } else {
            b = (n - a * 36) / 3;
        }
        System.out.print(a + " ");
        System.out.println(b);
    }
}