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