import java.util.Scanner;


public class E {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int b = n/36;
        int k = n-b*36;
        int a = k/3;
        if (k % 3==2)
            a++;
        if (a==12) {
            b++;
            a = 0;
        }
        System.out.println(b+" "+a);
    }

}
