import java.util.*;

public class MeasuringLengthsInBaden {
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		int n = cin.nextInt();
		if (n % 3 == 1 || n % 3 == 0) {
			n /= 3;
		} else {
			n++;
			n /= 3;
		}
		int feet = n / 12;
		int inches = n % 12;
		System.out.print(feet + " " + inches);
		cin.close();
	}
}
