import java.util.Scanner;


public class p125a {
    public static void main(String[] args) {
        Scanner
        in = new Scanner(System.in);
        int n = in.nextInt();
        
        int f = n/36;
        int left = n - 36*f;
        
        int i = left/3;
        left = left - i*3;
        if(left == 2)
            i++;
        
        int add = i/12;
        f += add;
        i -= 12*add;
        
        System.out.println(f+" "+i);
    }
}
