#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int f = 0, in, count;
  f = n / 36;
  in = (n - f * 36) / 3;
  count = (n - f * 36 - 3 * in);
  if (count == 2) in++;
  printf("%d %d\n", f, in);
  return 0;
}
