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.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    static int[] di = {0, -1, 0, 1};
    static int[] dj = {-1, 0, 1, 0};

    static int[] di_knight = {-1, -1, -2, -2, 1, 1, 2, 2};
    static int[] dj_knight = {2, -2, -1, 1, 2, -2, -1, 1};

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n1 = in.nextInt();
        int n2 = n1;
        int min = 0, max = 0;

        boolean off = false;
        while (n1 >= 0) {
            if (off) {
                min += (n1 >= 2) ? 2 : n1;
                n1 -= (n1 >= 2) ? 2 : n1;
            } else {
                n1 -= 5;
            }

            off = !off;
        }

        off = true;
        while (n2 >= 0) {
            if (off) {
                max += (n2 >= 2) ? 2 : n2;
                n2 -= (n2 >= 2) ? 2 : n2;
            } else {
                n2 -= 5;
            }

            off = !off;
        }

        System.out.println(min + " " + max);
    }

    public static Integer gcd(Integer a, Integer b) {
        if (b == 0)
            return a;

        return gcd(b, a % b);
    }

    // Check if String A is smaller lexicographically than String B
    public static Boolean compareStringLexicographically(String A, String B) {
        if (A == null || B == null)
            return true;

        if (B.indexOf(A) == 0)
            return true;

        for (int i = 0; i < Math.min(A.length(), B.length()); i++) {
            if (A.charAt(i) != B.charAt(i))
                return A.charAt(i) < B.charAt(i);
        }

        return A.length() < B.length();
    }

    // Read Integer
    public static Integer readInt() throws Exception {
        return Integer.parseInt(br.readLine());
    }

    // Read Integer
    public static Integer readInt(String str) throws Exception {
        return Integer.parseInt(str);
    }

    // Read Integer Array
    public static Integer[] readIntArray() throws Exception {
        String[] s = br.readLine().split(" ");
        Integer arr[] = new Integer[s.length];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = readInt(s[i]);
        }

        return arr;
    }
}
