#!/usr/bin/env python

from sys import stdin, stderr

def main():
   cm = int(stdin.readline().strip())
   inches = (cm+1)/3
   feet = inches / 12
   inches %= 12
   print feet, inches
   return 0

if __name__ == '__main__': main()
