import java.util.Scanner;

public class P125A
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int centi = in.nextInt();
		int inches = centi / 3;
		centi = centi % 3;
		if (centi == 2) inches ++;
		int feet = inches / 12;
		inches = inches % 12;
		System.out.format("%d %d", feet, inches);
	}

}
