#include <bits/stdc++.h>
int main(void) {
  int n, i, a = 0, b = 0, x;
  scanf("%d", &n);
  x = n;
  for (i = 0; i < n; i++) {
    if (x >= 3) {
      x = x - 3;
      b++;
    }
    if (b == 12) {
      a++;
      b = 0;
    }
  }
  if (x == 2) b++;
  if (b == 12) {
    a++;
    b = 0;
  }
  printf("%d %d", a, b);
  return 0;
}
