import sys

file = sys.stdin
n = int(file.readline().rstrip())
feet = n/(12*3)
n = n - feet*12*3

foot = n/3
n -= foot*3

if n == 2:
    foot += 1
    if foot == 12:
        foot = 0
        feet += 1

print feet, foot
