#include <bits/stdc++.h>
int main() {
  int n, temp;
  scanf("%d", &n);
  printf("%d\n", n / 42);
  temp = n - (n / 42) * 42;
  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;
}
