n=input()
f=float(n)

inch= round(f/3)


if inch<12:
	ans='0'+' '+ str(int(round(inch)))
elif inch%12==0:
	ans= str(int(inch/12)) +' ' +'0'
else:
	feet=int(inch)/12
	new=int(inch)%12
	ans=str(feet)+ ' ' + str(new)


print ans


