#! /usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    # 1 inch = 3 cm
    # 1 foot = 12 inches

    cm = getLineAs(int)[0]

    inch = int(float(cm) / 3 + 0.5)

    foot = inch / 12
    inch = inch % 12

    print foot, inch

    return 0

## -------------------------------------------
## TEMPLATE

from sys import stdin
from sys import setrecursionlimit
from copy import deepcopy
from math import sqrt
from itertools import permutations
from itertools import combinations

def getline():
    return stdin.readline()

def getLineAs(tp):
    return map(tp, getline().split())

def array(n, init = 0):
    return [deepcopy(init) for i in range(n)]

def count_if(lst, pred):
    ret = 0
    for i in lst:
        if pred(i): ret = ret + 1
    return ret

def toSepStr(lst):
    if len(lst):
        return "".join([str(item) + " " for item in lst])[:-1]
    else:
        return ""

if __name__ == "__main__":
    setrecursionlimit(1024 * 1024)
    main()
