#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int temp = n, max = 0, min = 0;
    bool flag = true;
    for (;;) {
      if (flag) {
        if (temp > 2) {
          temp = temp - 2;
          max = max + 2;
          flag = false;
        } else {
          max = max + temp;
          flag = false;
          break;
        }
      } else if (!flag) {
        if (temp > 5) {
          temp = temp - 5;
          flag = true;
        } else {
          flag = true;
          break;
        }
      }
    }
    temp = n;
    flag = true;
    for (;;) {
      if (flag) {
        if (temp > 5) {
          temp = temp - 5;
          flag = false;
        } else {
          break;
        }
      } else {
        if (temp > 2) {
          temp = temp - 2;
          min = min + 2;
          flag = true;
        } else {
          min = min + temp;
          break;
        }
      }
    }
    cout << min << " " << max << endl;
  }
  return 0;
}
