import java.util.*;


public class b {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long in = sc.nextLong();
        if(in%3==1)in--;
        else if (in%3==2)in++;
        in = in/3;
        int foot =0;
        
        while(in>=12){
            foot++;
            in-=12;
        }
        
        System.out.println(foot+" "+in);

    }
    
}
