#include <bits/stdc++.h>
using namespace std;
long long n, ans, ans1;
int main() {
  cin >> n;
  int cur = 1, cur1 = 6;
  for (int i = 1; i <= n; i++) {
    if (cur1 == 6 || cur1 == 7) ans1++;
    if (cur == 6 || cur == 7) ans++;
    cur++;
    cur1++;
    if (cur1 == 8) cur1 = 1;
    if (cur == 8) cur = 1;
  }
  cout << ans << ' ' << ans1;
}
