#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, i;
  for (scanf("%d", &n), i = 0; i < 1; a = n / 36, b = (n - a * 36) / 3, ++i)
    ;
  if ((n - a * 36) % 3 > 1) ++b;
  if (b >= 12) {
    a += b / 12;
    b %= 12;
  }
  cout << a << " " << b;
  return 0;
}
