n = int(raw_input())

by_foot = n / 3
if n - by_foot*3 == 2:
    by_foot += 1
feet = by_foot /12
by_inch = n - feet*36
if by_inch <= 0:
    inch = 0
else:
    inch = by_inch/3
    if by_inch - inch*3 == 2:
        inch += 1
        
print feet, inch
