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