#include <bits/stdc++.h>
using namespace std;
double round(double x) {
  double ret = x;
  int xx = x;
  x -= xx;
  if (x >= 0.5) {
    return ceil(ret);
  } else {
    return floor(ret);
  }
}
int main() {
  int n, feet;
  double in, ft;
  cin >> n;
  ft = floor((double)(n / (12. * 3.)));
  feet = ft;
  in = round((double)((n % (12 * 3)) * 1. / 3.));
  cout << ft << " " << in << endl;
  return 0;
}
