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