#include <bits/stdc++.h>
int main(void) {
  int n, t, i, vetor[7];
  scanf("%d", &n);
  t = n;
  memset(vetor, 0, sizeof(vetor));
  for (i = 0; n != 0; i++) {
    vetor[i]++;
    n--;
    if (i == 6) i = -1;
  }
  printf("%d ", vetor[5] + vetor[6]);
  memset(vetor, 0, sizeof(vetor));
  for (i = 5; t != 0; i++) {
    vetor[i]++;
    t--;
    if (i == 6) i = -1;
  }
  printf("%d\n", vetor[5] + vetor[6]);
  return 0;
}
