#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long ft = 0, in = 0, left;
  ft = n / 36;
  left = n - 36 * ft;
  if (left % 3 == 0 || left % 3 == 1)
    cout << ft << " " << left / 3 << '\n';
  else {
    if (left % 3 == 2 && left / 3 == 11)
      cout << ft + 1 << " " << 0 << '\n';
    else
      cout << ft << " " << (left / 3) + 1 << '\n';
  }
}
