#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, d, f;
  cin >> n;
  if (n % 3 == 2)
    d = n / 3 + 1;
  else
    d = n / 3;
  f = d / 12;
  d = d % 12;
  cout << f << ' ' << d << endl;
  return 0;
}
