import sys
import math
import string
def myround(f):
    if f <= 1:
        return 0
    else:
        return 1

x = string.atoi(raw_input())
print int(math.ceil(float(x) // 36)), int(float(x) % 36 // 3) + myround(float(x) % 36
% 3)
