#include <bits/stdc++.h>
int main() {
  int n, k;
  int inch = 3, f = 12 * inch;
  scanf("%d", &n);
  printf("%d", n / f);
  if (n == 2) {
    printf(" 1");
    return 0;
  }
  k = (n % f) / inch;
  if (k == 1 && inch != (n % f)) k++;
  printf(" %d", k);
  return 0;
}
