import java.util.*;

public class Solution 
{	
	public static void main(String[] args) 
	{
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		
		int inch=n/3+(n%3==2?1:0);
		int feet=inch/12;
		inch=inch-feet*12;
		
		System.out.println(feet+" "+inch);
	}
}