#include <bits/stdc++.h>
int main() {
  int a, b, c, d, e = 0, n;
  scanf("%d", &n);
  a = n / 3;
  b = a % 3;
  if (b == 2) {
    a = a + 1;
  }
  c = a / 12;
  d = a % 12;
  printf("%d %d\n", c, d);
}
