#include <bits/stdc++.h>
int fun(int x) {
  if (x > 0)
    return x;
  else
    return -x;
}
int main() {
  int n, i, j, sum, sub, minn, posi, posj;
  while (scanf("%d", &n) != EOF) {
    minn = 9999999;
    for (i = 0; i < 1000; i++) {
      for (j = 0; j < 4000; j++) {
        sum = i * 36 + j * 3;
        sub = fun(sum - n);
        if (sub <= minn) {
          posi = i;
          posj = j;
          minn = sub;
        }
      }
    }
    printf("%d %d\n", posi, posj);
  }
  return 0;
}
