import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner r = new Scanner(System.in);
        
        int n = r.nextInt();
        
        int feet = n/(12 * 3);
        if(n%(12 * 3) >= 18)feet++;
        
        int inch = (n - feet * 12 * 3)/3;
        if(inch > 0 && (n - feet * 12 * 3)%3 == 2)inch++;
        
        System.out.println(feet + " " + Math.max(inch, 0));
    }
}
