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