#include <bits/stdc++.h>
using namespace std;
int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
vector<string> form(string a, char s) {
  vector<string> v;
  string b;
  for (int i = 0; i < int(a.length()); i++) {
    if (a[i] == s) {
      v.push_back(b);
      b = "";
    } else
      b += a[i];
  }
  v.push_back(b);
  return v;
}
vector<int> formint(string a, char s) {
  vector<int> v;
  string b;
  for (int i = 0; i < int(a.length()); i++) {
    if (a[i] == s) {
      v.push_back(toInt(b));
      b = "";
    } else
      b += a[i];
  }
  v.push_back(toInt(b));
  return v;
}
template <class T>
void gcj(int n, T m) {
  cout << "Case #" << n + 1 << ": " << m << endl;
}
const double EPS = 1e-10, PI = acos(-1.0);
const int INF = 2100000000;
int main(void) {
  int n;
  cin >> n;
  n = (n + 1) / 3;
  cout << n / 12 << " " << n % 12 << endl;
  return 0;
}
