#include <bits/stdc++.h>
using namespace std;
int main() {
  float a, inch, k;
  int foot, f;
  cin >> a;
  k = a / 3;
  foot = (k / 12);
  inch = fmod(k, 12);
  f = ceil(inch);
  cout << foot << " " << f << endl;
}
