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