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