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