import java.io.*;
import java.util.*;

public class Main {
   
    public static void main(String[] args)throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int inch = n/3;
        if(n%3==2){
            inch++;
        }
        int ft = inch/12;
        System.out.println(ft+" "+inch%12);
    }
}