#include <bits/stdc++.h>
int main() {
  int n, a;
  int x;
  do {
    std::cin >> n;
  } while (n < 0 || n > 10000);
  a = n / 36;
  x = n % 36;
  int m = x / 3;
  float k = (float)x / 3;
  float t = k - m;
  if (t > 0.5) m++;
  std::cout << a << "  " << m;
}
