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