#include <bits/stdc++.h>
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    if (n % 3 == 2)
      n++;
    else if (n % 3 == 1)
      n--;
    printf("%d %d\n", n / 36, (n % 36) / 3);
  }
  return 0;
}
