import math

if __name__ == "__main__":
    a = input()
    inches = round(int(a) / 3 )
    if int(a) % 3 == 2:
        inches = inches + 1
    feet = math.floor(inches / 12)
    print int(feet),int(inches-feet*12)
