#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
template <typename T, typename TT>
ostream& operator<<(ostream& s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, vector<T> t) {
  for (int(i) = 0; (i) < (((int)(t.size()))); ++(i)) s << t[i] << " ";
  return s;
}
int a[] = {0, 0,  1,  1,  1,  2,  2,  2,  3,  3,  3,  4,  4, 4,
           5, 5,  5,  6,  6,  6,  7,  7,  7,  8,  8,  8,  9, 9,
           9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13};
int main() {
  int(n);
  scanf("%d", &(n));
  int x = n / 36;
  n %= 36;
  int y = a[n];
  if (y == 12) {
    y = 0;
    x++;
  }
  printf("%d %d", x, y);
}
