#include <bits/stdc++.h>
using namespace std;
int main() {
  long int a, b, m, n, k, l, o, p, i, j, d, f;
  cin >> n;
  d = n / 3;
  if (n % 3 == 2) {
    d++;
  }
  f = d / 12;
  d = d % 12;
  cout << f << " " << d;
  return 0;
}
