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);



  c = Math.round(c/3);

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

  }
}