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