centimeters=int(input())

feet_to_centi=36
inches_to_centi=3

feet=centimeters//feet_to_centi
left_centimeters=centimeters-(feet*36)
if(left_centimeters>=18):
    feet+=1
    left_centimeters=0
inches=left_centimeters//inches_to_centi
left_centimeters=left_centimeters-(inches*3)

if(left_centimeters>=2):
    inches+=1

print(feet,inches)