# Codeforces Testing Round 2
# Problem A: Measuring Lengths in Baden

def conversion(cm):
    inches = round(float(cm)/3)
    inches = int(inches)
    feet = int(inches/12.0)
    feet = int(feet)
    inches = inches % 12
    return str(feet) + " " + str(inches)

cm = raw_input("")
cm = int(cm)
print conversion(cm)
