#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, d;
  cin >> a;
  if (a == 1)
    cout << 0 << " " << 0;
  else {
    b = ceil(a / 3);
    c = floor(b / 12);
    d = ceil(b - (c * 12));
    cout << c << " " << d;
  }
  return 0;
}
