#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const double PI2 = 8.0 * atan(1.0);
template <class T>
T MIN(const T& a, const T& b) {
  return a < b ? a : b;
}
template <class T>
T MAX(const T& a, const T& b) {
  return a > b ? a : b;
}
template <class T>
void MIN_UPDATE(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void MAX_UPDATE(T& a, const T& b) {
  if (a < b) a = b;
}
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  ++n;
  cout << n / 36 << " " << (n - n / 36 * 36) / 3 << endl;
}
