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