#include <bits/stdc++.h>
using namespace std;
long long n, numf, numi;
int main() {
  cin >> n;
  numf = n / 36;
  numi = n - numf * 36;
  if (numi % 3 == 2) numi++;
  cout << numi << " " << numf;
  return 0;
}
