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