import java.util.*;

public class Main 
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int cm = sc.nextInt();
		//convert to inches
		int inch;
		inch = cm/3;
		int check = cm-inch*3;
		if(check==2)
		{
			inch++;
		}
		int foot = inch/12;
		inch = inch-foot*12;
		System.out.print(foot+" "+inch);
	}	
}
