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