import java.util.*;
public class baden
{
	public static void main(String args[])
	{
		Scanner obj=new Scanner(System.in);
		int a,b,c,e,f;
		a=obj.nextInt();
		b=a/3;
		c=a%3;
		if(c==2)
			b=b+1;
		e=b/12;
		f=b%12;
		System.out.println(e+" "+f);
	}
}