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