#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned num_cms;
  cin >> num_cms;
  unsigned num_inches = (num_cms % 3) == 0 ? (num_cms / 3) : (num_cms / 3) + 1;
  if (num_cms == 1) {
    cout << "0 0" << endl;
  } else {
    cout << num_inches / 12 << " " << num_inches % 12 << endl;
  }
}
