#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int a = n / 36;
  int s = (n - 36 * a) / 3;
  int aa = n - 36 * a - 3 * s;
  if (aa == 2) {
    s++;
    if (s == 12) {
      a++;
      s = 0;
    }
  }
  printf("%d %d", a, s);
  return 0;
}
