import java.util.Scanner;

public class BadenLengths {
    
    public static void main(String[] args){
        
        Scanner in = new Scanner(System.in);
        
        int cm = in.nextInt();
        
        int inches = 0;
        int foot = 0;
        int round = 0;
        
        if((cm % 3) == 0)
            inches = cm/3;
        else {
            round = cm%3;           
            inches = (cm - (cm%3))/3;           
            if (round == 1)
                inches += 0;
            else if(round == 2)
                inches +=1;
            }
        
        
        if(inches % 12 == 0){
            foot = inches/2;
            System.out.println(foot + " " + "0");
        }else if(inches < 12){
            System.out.println("0" + " " + inches);
        }else if(inches > 12){
            foot = inches - (inches%12);
            
            foot/=12;
            System.out.println(foot + " " + (inches%12));
        }
            
    }

}