import java.util.Scanner;
public class Ishu1
{
	public static void main(String[] args)
	{
	Scanner scan=new Scanner(System.in);
	int n,feet,inches;
	n=scan.nextInt();
	inches=n/3;
	if(n%3==2)
		++inches;
	feet=inches/12;
	inches=inches-feet*12;
	System.out.println(feet+" "+inches);
	}
}