#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, t, k, c, n, p;
  scanf("%d", &t);
  n = t % 36;
  k = 0;
  if (n % 3 == 2) k++;
  k += (n / 3);
  printf("%d %d\n", (t / 36), k);
  return 0;
}
