#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  double input, inch = 0, foot = 0;
  cin >> input;
  inch = round(input / 3);
  if (inch >= 12) {
    foot = round(inch / 12);
    if ((inch - foot * 12) < 0) {
      foot = foot - 1;
    }
    inch = inch - foot * 12;
  }
  cout << foot << " " << inch;
  cout << endl;
  return 0;
}
