import java.util.Scanner;
public class Javabasics {
    public static void main(String[] args){
        Scanner enter = new Scanner(System.in);
        int n = enter.nextInt(), inches = n/3 +(n % 3 > 1 ? 1 : 0), feet = inches /12;
        inches %= 12;
        System.out.println(feet + " " + inches);
    }
}