import java.util.*;
public class ja {
    public static void main (String [] args) {
        Scanner kb = new Scanner (System.in);
        int num = kb.nextInt();
        int add = num % 3;
        if (add == 1) {
            add = 0;
        }
        if (add == 2) {
            add = 1;
        }
        int inches = num / 3 + add;
        int feet = inches / 12;
        int leftover = inches - (feet * 12);
        System.out.println(feet + " " + leftover);
    }
}