import java.util.*;
public class MeasuringLengthsInBaden
{
	public static void main(String[] args) 
	{
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		if(n==1)
		{
			System.out.println("0 0");
		}
		else if(n==2)
		{
			System.out.println("0 1");
		}
		
		else
		{
			int foots=n/36;
			int rem=n-foots*36;
			int inches=0;
			if(rem%3==0 || rem%3==1)
			{
				inches=rem/3;
			}
			else
			{
				inches=(rem/3)+1;
			}
			
			System.out.println(foots+" "+inches);
		}
	}
}
