#include <bits/stdc++.h>
using namespace std;
int n, sum = 0, ans = 0;
int day1[7] = {1, 1, 0, 0, 0, 0, 0}, day2[7] = {0, 0, 0, 0, 0, 1, 1};
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    sum += day1[i % 7];
    ans += day2[i % 7];
  }
  cout << ans << " " << sum << endl;
  return 0;
}
