#include <bits/stdc++.h>
using namespace std;
bool isPrime(int x) {
  vector<int> z(1e5);
  for (int i = (0); i < ((int)z.size()); i++) z[i] = 1;
  z[0] = 0;
  z[1] = 0;
  int j;
  for (int i = (2); i < ((int)z.size()); i++) {
    j = i + i;
    while (j < (int)z.size()) z[j] = 0;
  }
  return z[x];
}
int main() {
  int n, a, b;
  b = 1;
  cin >> n;
  while (3 * b < n) {
    b++;
  }
  if ((3 * b - n) == 2) b--;
  a = b / 12;
  b = b % 12;
  printf("%d %d", a, b);
  return 0;
}
