#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int foot = n / 36;
  float b = n % 36;
  int kkk = b / 3;
  double kk = kkk + 0.5;
  float inch = b / 3;
  if (inch >= kk) {
    cout << foot << " " << ceil(inch);
  } else if (inch < kk)
    cout << foot << " " << floor(inch);
  return 0;
}
