#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)
    inch = ceil(inch);
  else if (inch < kk)
    inch = floor(inch);
  int sss = (float)(inch);
  if (sss % 12 == 0) {
    inch = 0;
    foot += (sss / 12);
  }
  cout << foot << " " << inch;
  return 0;
}
