import sys

if __name__ == '__main__':
	
	#cin = open("1.in", "r")
	#cout = sys.stdout
	cin = sys.stdin
	
	n = int(cin.read())
	
	if (n%3)==2:
		n+=1
	f = n/(36)
	n %= 36
	i = n/3
	n%=3
	if n>1:
		i+=1
	print str(f) + " " + str(i)