#include <bits/stdc++.h>
int main() {
  int n, a, b;
  double x, y;
  while (scanf("%d", &n) != EOF) {
    x = n / 36.0;
    a = x + 0.5;
    y = (n - a * 36) / 3.0;
    b = y + 0.5;
    printf("%d %d\n", a, b);
  }
  return 0;
}
