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.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringJoiner;
import java.util.StringTokenizer;
import java.util.stream.Collectors;

public class Solution {
    public static void main(String[] args) throws IOException {
        IO io = new IO();
        int n = io.getInt(), min, max ;

        min = max = (n / 7) * 2 ;
        min += Math.max(0, n % 7 - 5) ;
        max += Math.min(2, n % 7) ;
        System.out.println(min + " " + max) ;
    }

    public static long subSum(long[] preSum, int i, int j) {
        if (i > j)
            return Integer.MIN_VALUE;
        if (i == 0)
            return preSum[j];
        return preSum[j] - preSum[i - 1];
    }
}

class Utils {
    public static <T> ArrayList<IndexedElement<T>> getIndexedArray(ArrayList<T> ip) {
        ArrayList<IndexedElement<T>> op = new ArrayList<>();
        for (int i = 0; i < ip.size(); i++) {
            op.add(new IndexedElement<>(i, ip.get(i)));
        }
        return op;
    }

    public static <T> String join(List<T> arr, CharSequence delim) {
        StringJoiner sj = new StringJoiner(delim);
        for (T a : arr)
            sj.add(a.toString());
        return sj.toString();
    }

    public static void reverse(List<Integer> a, int l, int h) {
        int n = a.size();
        if (l >= 0 && l < n && h >= 0 && h < n && l < h) {
            while (l < h) {
                int temp = a.get(l);
                a.set(l, a.get(h));
                a.set(h, temp);
                l++;
                h--;
            }
        }
    }

    public static int andBitString(String s) {
        if (s.length() == 0)
            return 1;
        int res = s.charAt(0) - '0';
        for (int i = 1; i < s.length(); i++)
            res = res & (s.charAt(i) - '0');
        return res;
    }

    static class IndexedElement<T> {
        int idx;
        T val;

        public IndexedElement(int idx, T val) {
            this.idx = idx;
            this.val = val;
        }

        @Override
        public String toString() {
            return "IndexedElement{" +
                    "idx=" + idx +
                    ", val=" + val +
                    '}';
        }
    }
}

class IO {
    private BufferedReader br = null;

    public IO() {
        this.br = new BufferedReader(new InputStreamReader(System.in));
    }

    public ArrayList<Integer> getIntegerArray(int n) throws IOException {
        ArrayList<String> strings = this.getStringArray(n);
        return new ArrayList<>(strings.stream().map(Integer::parseInt).collect(Collectors.toList()));
    }

    public int getInt() throws IOException {
        return getIntegerArray(1).get(0);
    }

    public ArrayList<Long> getLongArray(int n) throws IOException {
        ArrayList<String> strings = this.getStringArray(n);
        return new ArrayList<>(strings.stream().map(Long::parseLong).collect(Collectors.toList()));
    }

    public ArrayList<Double> getDoubleArray(int n) throws IOException {
        ArrayList<String> strings = this.getStringArray(n);
        return new ArrayList<>(strings.stream().map(Double::parseDouble).collect(Collectors.toList()));
    }

    public ArrayList<String> getStringArray(int n) throws IOException {
        ArrayList<String> arr = new ArrayList<>();
        StringTokenizer st = new StringTokenizer(br.readLine());

        while (st.hasMoreTokens()) {
            arr.add(st.nextToken());
        }

        return arr;
    }

    public ArrayList<Pair<Integer>> getIntegerPairArray(int n) throws IOException {
        ArrayList<Pair<Integer>> pairs = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            StringTokenizer st = new StringTokenizer(br.readLine());
            pairs.add(new Pair<>(Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken())));
        }
        return pairs;
    }

    static class Pair<T> {
        T a, b;

        public Pair(T a, T b) {
            this.a = a;
            this.b = b;
        }

        @Override
        public String toString() {
            return "Pair{" +
                    "a=" + a +
                    ", b=" + b +
                    '}';
        }
    }
}