#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, k, l, p, q;
  cin >> n;
  m = n % 36;
  k = n / 36;
  p = m / 3;
  q = m % 3;
  if (q == 2) p = p + 1;
  cout << k << " " << p << endl;
}
