import java.util.*;
public class Main {
  public static void main (String [] args){

Scanner in =new Scanner (System.in);
  int a =in.nextInt();

  int b = (a/36);
  int c = (a%36);

  if (c==35){

  	  System.out.print(b+1 +" 0");}
  else if(c%3==2){

  c = Math.round(c/3) + 1;}

 else{

  c = Math.round(c/3);


    System.out.print(b + " " + c);}

  }
}