import java.util.*;
public class susbus{
   
   public static void main(String[] args){
      Scanner sc= new Scanner(System.in);
      int c = sc.nextInt();
      int feet = c/36;
      if(c%36==35) feet++;
      int cm = c-36*feet;
      int in= 0;
      if(cm%3==0 || cm%3==1) in = cm/3;
      else in = cm/3+1;
      System.out.println(feet + " "+Math.max(in,0));
   }
}