import java.util.Scanner;

public class MeasuringLengthsinBaden
{
    public static void main(String[] args)
    {
       
MeasuringLengthsinBaden object=new MeasuringLengthsinBaden();
  Scanner input = new Scanner(System.in);
  System.out.println(object.MeasuringLengthsinBadenFn(Integer.parseInt(input.nextLine())));
    }
    public String MeasuringLengthsinBadenFn(int number)
    {
String output="";
String feet="";
String inches="";
feet=Integer.toString(Math.round(number/36));
inches=Integer.toString(Math.round(number/2));

        return feet+" "+number/Integer.parseInt(inches);
    }
}
