#include <bits/stdc++.h>
using namespace std;
int main() {
  int cm, ft, in;
  cin >> cm;
  ft = cm / 36;
  int rem = cm % 36;
  in = rem / 3;
  if (rem % 3 == 2)
    in = (rem + 2) / 3;
  else
    in = rem / 3;
  cout << ft << " " << in << endl;
}
