#include <bits/stdc++.h>
int main() {
  int n, m, p, x, j, k, s;
  scanf("%d", &n);
  s = n / 36;
  m = n - (s * 36);
  p = m / 3;
  x = m - (p * 3);
  if (x > 1) p = p + 1;
  if (p == 12) {
    s = s + 1;
    p = p - 12;
  }
  printf("%d %d", s, p);
  return 0;
}
