#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if ((n + 1) % 36 == 0) n++;
  int npies = n / 36;
  int b = n - npies * 36;
  int npulgadas = b / 3;
  if (b - 3 * npulgadas == 2) npulgadas++;
  cout << npies << " " << npulgadas << endl;
  return 0;
}
