#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  double i = n / 3.0;
  int in = i;
  if (i - in > 0.6) in += 1;
  int f = in / 12;
  cout << f << " " << in - f * 12 << "\n";
}
