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