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