#include <bits/stdc++.h>
using namespace std;
long const md = 1000000007;
long const mx = 2147483647;
long dx[4] = {1, 2, 2, 1};
long dy[4] = {-2, -1, 1, 2};
long l, n, m, c, k;
int main() {
  scanf("%d", &n);
  l = n / 3;
  n %= 3;
  if (n == 2) l++;
  n = l / 12;
  l %= 12;
  printf("%d%s%d", n, " ", l);
}
