#include <bits/stdc++.h>
int main() {
  int n, a, b, c, d;
  scanf("%d", &n);
  a = n / 3;
  b = a / 12;
  if (b == 0) {
    d = n % 3;
    if (d == 1) {
      printf("0 %d\n", a);
    } else if (d == 2) {
      printf("0 %d\n", a + 1);
    } else if (d == 0) {
      printf("0 %d\n", a);
    }
  } else {
    c = a % 12;
    printf("%d %d\n", b, c);
  }
}
