import java.util.Scanner;


public class Main {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner read = new Scanner(System.in);
        int cm = read.nextInt();
        // 1 in = 3 cm
        // 1 fo = 12 inc
        // 1/36 fo = 1 cm
        //1 fo = 36 cm
        int feet , inch;
        feet = cm / 36;
        inch = (cm % 36) / 3;
        inch += ((cm % 36) % 3)>1?1:0;
        System.out.printf("%d %d\n", feet, inch);
    }

}