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