#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  double t = n / 3, ninch, nfeet;
  if (t - int(t) < int(t) + 1 - t)
    ninch = int(t);
  else
    ninch = int(t) + 1;
  t = ninch / 12;
  nfeet = int(t);
  t = (n - nfeet * 36) / 3;
  if (t - int(t) < int(t) + 1 - t)
    ninch = int(t);
  else
    ninch = int(t) + 1;
  cout << nfeet << " " << ninch;
  return 0;
}
