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