#include <bits/stdc++.h>
using namespace std;
int main() {
  int cm;
  cin >> cm;
  int inch, feet;
  inch = cm / 3;
  if (cm % 3 > 1) inch++;
  feet = inch / 12;
  inch = inch % 12;
  cout << feet << " " << inch;
  return 0;
}
