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