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);
        int inch = (n - feet*12*3)/3;
        if((n-feet * 12 * 3)%3 == 2)inch++;
        
        System.out.println(feet + " " + inch);
    }
}
