#include <bits/stdc++.h>
using namespace std;
int main() {
  int cen, feet = 0, inch;
  cin >> cen;
  inch = cen / 3;
  if (cen % 3 == 2) inch++;
  if (inch >= 12) {
    feet = inch / 12;
    inch = inch % 12;
  }
  cout << feet << " " << inch << endl;
  return 0;
}
