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.
import java.util.*;

public class Absolutezero {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int d1=n%7;
        int maxdaysoff=n/7 * 2;
        int mindaysoff=n/7 * 2;
        if(d1==1){
            maxdaysoff=n/7 * 2 + 1;
            mindaysoff=n/7 * 2;
        }else if(d1 >= 2 && d1<=5) {
            maxdaysoff=n/7 * 2 + 2;
            mindaysoff=n/7 * 2;

        }else if(d1>=6){
            maxdaysoff=n/7 * 2 + 2;
            mindaysoff=n/7 * 2 + 1;

        }
        System.out.println(mindaysoff+" "+maxdaysoff);



    }

    public List<Integer> getDivisors(int n) {
        List<Integer> list = new ArrayList<>();
        for (int d = 2; d * d <= n; d++) {
            while (n % d == 0) {
                list.add(d);
                n /= d;
            }
        }
        if (n > 1) {
            list.add(n);
        }
        return list;
    }

    public int gcd(int n1, int n2) {
        int gcd = 1;
        for (int i = 1; i <= n1 && i <= n2; ++i) {
            // Checks if i is factor of both integers
            if (n1 % i == 0 && n2 % i == 0)
                gcd = i;
        }

        // int lcm = (n1 * n2) / gcd;
        return gcd;
    }
}