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