#include <bits/stdc++.h>
using namespace std;
int n, m, inc = 3, foo = 3 * 12;
int main() {
  scanf("%d", &n);
  int t1, t2;
  t1 = n / foo;
  if (n - t1 * foo == foo - 1) {
    printf("%d %d\n", t1 + 1, 0);
    return 0;
  }
  t2 = n % foo;
  if (t2 % inc == 2)
    t2 = t2 / inc + 1;
  else
    t2 = t2 / inc;
  printf("%d %d\n", t1, t2);
  return 0;
}
