#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<pair<long long int, pair<long long int, long long int> > > ans;
  for (long long int i = 0; i < ((long long int)(300)); ++i)
    for (long long int j = 0; j < ((long long int)(12)); ++j)
      ans.push_back(make_pair(abs(n - (i * 36 + j * 3)), make_pair(i, j)));
  sort((ans).begin(), (ans).end());
  cout << ans[0].second.first << " " << ans[0].second.second << endl;
}
