import java.util.*;
import java.math.BigInteger;


public class Main {
	   public static void main(String[] args) {
		   Scanner in=new Scanner(System.in);
		   int n;
		   n=in.nextInt();
		   int inch=n/3;
		   if(n%3==2) inch++;
		   int feets=inch/12;
		   inch%=12;
		   System.out.print(feets);
		   System.out.print(" ");
		   System.out.print(inch);
	       in.close();
	   }
       
}

    	 	 		 	   		  					  	   	