#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int f = n / 36;
  int rem = n - (36 * f);
  int inc = rem / 3;
  rem = rem - (inc * 3);
  if (rem == 2) {
    inc += 1;
    if (inc == 12)
      cout << f + 1 << " " << 0 << endl;
    else
      cout << f << " " << inc << endl;
  } else
    cout << f << " " << inc << endl;
  return 0;
}
