On the planet Mars a year lasts exactly n days (there are no leap years on Mars). But Martians have the same weeks as earthlings — 5 work days and then 2 days off. Your task is to determine the minimum possible and the maximum possible number of days off per year on Mars.

Input

The first line of the input contains a positive integer n (1 ≤ n ≤ 1 000 000) — the number of days in a year on Mars.

Output

Print two integers — the minimum possible and the maximum possible number of days off per year on Mars.

Examples

Input

14


Output

4 4


Input

2


Output

0 2

Note

In the first sample there are 14 days in a year on Mars, and therefore independently of the day a year starts with there will be exactly 4 days off .

In the second sample there are only 2 days in a year on Mars, and they can both be either work days or days off.
#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1000000007;
long long int inf = 1e15;
void scan(int &x);
long long int powermod(long long int _a, long long int _b, long long int _m) {
  long long int _r = 1;
  while (_b) {
    if (_b % 2 == 1) _r = (_r * _a) % _m;
    _b /= 2;
    _a = (_a * _a) % _m;
  }
  return _r;
}
long long int string_to_number(string s) {
  long long int x = 0;
  stringstream convert(s);
  convert >> x;
  return x;
}
long long int add(long long int a, long long int b) {
  long long int x = (a + b) % MOD;
  return x;
}
long long int mul(long long int a, long long int b) {
  long long int x = (a * b) % MOD;
  return x;
}
long long int sub(long long int a, long long int b) {
  long long int x = (a - b + MOD) % MOD;
  return x;
}
long long int divi(long long int a, long long int b) {
  long long int x = a;
  long long int y = powermod(b, MOD - 2, MOD);
  long long int res = (x * y) % MOD;
  return res;
}
int min(int a, int b) { return a < b ? a : b; }
int col[100006];
int main() {
  int n;
  cin >> n;
  int val = n / 7;
  int mini = 0, maxi = 0;
  mini = 2 * val, maxi = 2 * val;
  if ((n % 7) == 1) maxi = 2 * val + 1;
  if ((n % 7) >= 2) maxi = 2 * val + 2;
  if ((n % 7) == 6) mini = 2 * val + 1;
  cout << mini << " " << maxi;
  return 0;
}
void scan(int &x) {
  register int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
