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