#include <bits/stdc++.h>
using namespace std;
int main() {
  long x, in = 0, ba = 0;
  long t = 0, c = 3;
  cin >> x;
  t = x % c;
  in = ((x - t) / c) + (t > 1 ? 1 : 0);
  t = x % c;
  in = ((x - t) / c) + (t > 1 ? 1 : 0);
  c = 12;
  ba = long(in / c);
  cout << ba << " " << in - (ba * c);
  return 0;
}
