#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i = (n + 18) / 36;
  n -= (i * 36);
  cout << i << ' ';
  if (n < 0)
    cout << 0 << endl;
  else
    cout << (n * 2 + 3) / 6 << endl;
  return 0;
}
