import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int f = n / 36;
        int left = n % 36;
        int inch = left / 3;
        left = left % 3;
        if(left>1)inch++;
        System.out.println(f+" "+inch);
    }
}
