import java.util.*;
public class Main {
    public static void main(String[] agrs){
        Scanner in = new Scanner(System.in);
        while(in.hasNext()){
            int n = in.nextInt();
            int inc = n/3;
            int b = n%3;
            if(b>=2) inc+=1;
            int foot = inc/12;
            b = inc%12;
            System.out.println(foot + " " + b);
            //
        }
    }
}
	  		 	  					 		 		 		 	  		 	