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