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