#include <bits/stdc++.h>
using namespace std;
int main() {
  long long temp;
  cin >> temp;
  long long inc = temp / 3ll;
  long long rem = temp % 3ll;
  if (rem == 2) inc++;
  long long fit = inc / 12ll;
  rem = inc % 12ll;
  cout << fit << " " << rem << endl;
  return 0;
}
