import java.util.Scanner;

public class A125 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int feet = N/36;
        N %= 36;
        int inches = N/3;
        N %= 3;
        if (N == 2) {
            inches++;
        }
        if (inches == 12) {
            inches = 0;
            feet++;
        }
        System.out.println(feet + " " + inches);
    }

}
