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