import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n1 = scan.nextInt();
        int feet = n1 / 36;
        n1 %= 36;
        int inch = n1 / 3;
        n1 %= 3;
        if (n1 == 2){
            inch++;
        }
        System.out.println(feet +" "+inch);
    }
}
