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.
//package com.company;
import java.util.*;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int t  =scanner.nextInt();
        int min = 0;int max=0;
        min+=t/7;
        min*=2;
        max+=min;
        if(t%7==6){
            min++;
        }
        if(t%7<=2){
            max+=t%7;
        }else {
            max+=2;
        }

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

    private static int fibo(int n){
        if(n==0){
            return 0;
        }
        if(n==1){
            return 1;
        }
        return fibo(n-1)+fibo(n-2);
    }
    private static void swap(int[] array , int a,int b){
        if(a==b){
            return;
        }
        int temp = array[a];
        array[a] = array[b];
        array[b] = temp;
    }
    private static Scanner scanner = new Scanner(System.in);
    private static int max(int[] array ){
        int min = Integer.MIN_VALUE;
        for(int i = 0;i< array.length;i++){
            if(array[i]>min){
                min = array[i];
            }
        }
        return min;
    }
    private static int min(int[] array ){
        int min = Integer.MAX_VALUE;
        for(int i = 0;i< array.length;i++){
            if(array[i]<min){
                min = array[i];
            }
        }
        return min;
    }
    private static void readArray(int[] array){
        for(int i = 0;i< array.length;i++){
            array[i] = scanner.nextInt();
        }
    }
    private static void printarray(int[] array){
        for(int i = 0; i< array.length;i++){
            System.out.print(array[i]);
        }
    }
    private static int gcd(int a , int b){
       if(b==0) return  a;
       else return gcd(b,a%b);
    }
    private static long fact(int n){
        if(n==1) return 1;
        else return (long) n*fact(n-1);
    }
    private static int Arraysum(int[] array){
        int sum = 0;
        for(int i = 0 ;i< array.length;i++){
            sum+=array[i];
        }
        return sum;
    }
    private static boolean isPrime(long n){
        if(n==1){
            return false;
        }
        for(long i = 2;i<=Math.sqrt(n);i++){
            if(n%i==0){
                return false;
            }
        }
        return true;
    }
    private static int multiply(int[] array){
        int mult = 1 ;
        for(int i = 0 ;i< array.length;i++) {
            mult *= array[i];
        }
        return mult;
    }
}