#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
int main() {
  int N;
  cin >> N;
  if (N % 3 == 2)
    ++N;
  else
    N -= N % 3;
  int inch = N / 3;
  int foot = inch / 12;
  inch -= 12 * foot;
  cout << foot << " " << inch << endl;
  return 0;
}
