#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, s;
  cin >> n;
  if (n % 3 == 0) {
    s = n / 3;
  } else {
    float q = 1.0 * n / 3;
    s = n / 3;
    if (q - s >= 0.5) {
      s = n / 3 + 1;
    } else {
      s = n / 3;
    }
  }
  cout << s / 12 << " " << s % 12 << endl;
  return 0;
}
