import java.util.Scanner;


public class Prob125A
{
    public static void main( String[] Args )
    {
        Scanner scan = new Scanner( System.in );
        int cm = scan.nextInt();
        int inches = ( cm + 1 ) / 3;
        System.out.println( inches / 12 + " " + inches % 12 );
    }
}
