#include <bits/stdc++.h>
using namespace std;
int main() {
  int inch = 0, fet = 0, cm = 0;
  cin >> cm;
  if (cm % 3 == 2) {
    fet = ((int)cm + 1) / 36;
    cm -= (fet * 36);
    inch = (cm + 1) / 3;
    cout << fet << " " << inch << endl;
    return 0;
  } else if (cm % 3 == 2) {
    fet = ((int)cm - 1) / 36;
    cm -= (fet * 36);
    inch = (cm - 1) / 3;
    cout << fet << " " << inch << endl;
    return 0;
  } else {
    fet = ((int)cm) / 36;
    cm -= (fet * 36);
    inch = cm / 3;
    cout << fet << " " << inch << endl;
    return 0;
  }
}
