#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  int N, d, f;
  scanf("%d", &N);
  d = N / 3;
  if (N % 3 > 1) {
    d++;
  }
  f = d / 12;
  d = d - f * 12;
  printf("%d %d\n", f, d);
  return 0;
}
