#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
const double PI = acos(-1.0);
const int oo = 0x7f7f7f7f;
inline int max(int a, int b) {
  if (a > b) return a;
  return b;
}
inline int min(int a, int b) {
  if (a < b) return a;
  return b;
}
template <class T>
inline T lowbit(T a) {
  return a & -a;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void checkmin(T &a, T b) {
  if (a == -1 || a > b) a = b;
}
int main(void) {
  long long a, b, c;
  long long n;
  scanf("%I64d", &n);
  a = n / 36;
  b = n - 36 * a;
  c = b / 3;
  b -= c * 3;
  if (b == 2) c++;
  printf("%I64d %I64d\n", a, c);
  return 0;
}
