#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, rMin = 0, rMax = 0;
  cin >> n;
  int copyN = n;
  while (n > 0) {
    if (n >= 2) {
      n -= 2;
      rMax += 2;
    } else
      rMax += n, n = 0;
    if (n >= 5)
      n -= 5;
    else
      n = 0;
  }
  n = copyN;
  while (n > 0) {
    if (n >= 5)
      n -= 5;
    else
      n = 0;
    if (n >= 2) {
      n -= 2;
      rMin += 2;
    } else
      rMin += n, n = 0;
  }
  cout << rMin << " " << rMax;
  return 0;
}
