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