#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  cout << n / 36 << " ";
  long long m = n % 36;
  if (m % 3 == 0)
    cout << m / 3 << endl;
  else
    cout << (m / 3) + 1 << endl;
}
