#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7FFFFFFF;
const double eps = 1e-8;
const double pi = acos(-1.0);
int n;
int main() {
  cin >> n;
  int ret1 = n / 36;
  n -= ret1 * 36;
  int ret2 = n / 3;
  if (n % 3 > 1) ++ret2;
  if (ret2 == 12) {
    ++ret1;
    ret2 = 0;
  }
  cout << ret1 << ' ' << ret2 << endl;
  return 0;
}
