#!/usr/bin/python
import sys
while True:
	s = sys.stdin.readline ().strip ()
	if s == '':
		s = sys.stdin.readline ().strip ()
		if s == '':
			break
	n = int (s)
	v = (n + 1) / 3
	print v / 12, v % 12
