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