#include <bits/stdc++.h>
using namespace std;
int main() {
  double n;
  cin >> n;
  double q = n / 3;
  if (q - double((int(n / 3))) >= 0.5) q++;
  int r = int(q);
  cout << r / 12 << " " << r % 12;
}
