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