#include <bits/stdc++.h>
int main() {
  int n, temp, p, f, q, i;
  scanf("%d", &n);
  if (n == 35) {
    printf("1\n");
    printf("0\n");
  } else {
    f = n / 36;
    p = n / 36;
    temp = n - p * 36;
    if (temp % 3 == 0)
      q = temp / 3;
    else if (temp % 3 == 1)
      q = temp / 3;
    else
      q = (temp / 3) + 1;
    if (q == 12)
      printf("%d 0\n", f + 1);
    else
      printf("%d %d\n", f, q);
  }
  return 0;
}
