

import java.util.Scanner;

public class A125 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n < 36) {
            int m = n / 3;
            System.out.println(0);
            if (n % 3 > 1) {
                m++;
            }
            System.out.println(m);
        }
        if (n >= 36) {
            int m = n / 36;
            System.out.println(m);
            
            int z = (n % 36) / 3;
            if(m % 3 > 1){
                z++;
            }
            System.out.println(z);
        }
    }

}
