#include <bits/stdc++.h>
using namespace std;
int main() {
  int centimeters, feet, inches;
  while (cin >> centimeters) {
    inches = int(centimeters * 1.0 / 3 + 0.5);
    feet = int(centimeters * 1.0 / 36 + 0.5);
    cout << feet << " " << inches << endl;
  }
}
