#include <bits/stdc++.h>
using namespace std;
long long int a, b, c, d;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> a;
  d = a;
  while (a > 0) {
    a--;
    b++;
    if (a <= 0) break;
    a--;
    b++;
    if (a <= 0) break;
    a -= 5;
  }
  while (d > 0) {
    d -= 5;
    if (d <= 0) break;
    d--;
    c++;
    if (d <= 0) break;
    d--;
    c++;
    if (d <= 0) break;
  }
  cout << c << " " << b;
  return 0;
}
