#include <bits/stdc++.h>
int main() {
  int i, n, j, k, m, a;
  scanf("%d", &n);
  i = n / 3;
  m = n % 3;
  j = i / 12;
  k = i % 12;
  if (m == 0) {
    j = i / 12;
    k = i % 12;
    printf("%d %d", j, k);
  } else if (m == 2) {
    j = i / 12;
    k = i % 12;
    a = k + 1;
    if (a == 12) {
      printf("%d 0", j + 1);
    } else
      printf("%d %d", j, a);
  } else {
    j = i / 12;
    k = i % 12;
    printf("%d %d", j, k);
  }
}
