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

import java.io.*;

public class Main {
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));

		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
	static int binary(int a[],int start,int end,int number){
		start=0;
		end=a.length-1;
		int mid=0;

		while(start<=end){
			mid=end+(end-start)/2;
			if(a[mid]==number){
				return mid;
			}
			else
			if(a[mid]<number){
               start=mid+1;
			}
			else
			end=mid-1;
		}
		return 0;
		
	}
 static void sieve(){
	 boolean bl[]=new boolean[10001];
	 bl[0]=true;
	 bl[1]=true;
	for (int i = 2; i < bl.length; i++) {
		 bl[i]=false;
	}
   for (int i = 2; i <=Math.sqrt(10000); i++) {
	   if(bl[i]==false){
	   for (int j = i*i ;j <=10000; j=j+i) {
	           bl[j]=true;	   
		
		} 
		
	}}

	for(int i=0;i<=100;++i){
		System.out.println(bl[i]+" "+i);
	}
	   }
	    
   
 
	static void swap(int a[], int i, int j) {
		int temp = a[i];
		a[i] = a[j];
		a[j] = temp;
	}

	static void fill(int start, int end, int a[]) {
		for (int i = 0; i < end; ++i) {
			a[i] = scan.nextInt();
		}
	}
    static FastReader sc=new FastReader();
	static FastReader scan = new FastReader();
	static long power(long a,long b){
		return (long)(Math.log(a)/Math.log(b));
	}
	static boolean isPowerOfTwo(long n,long m)
	{
		if(n==0)
		return false;
	 
	return (int)(Math.ceil((Math.log(n) / Math.log(m)))) == 
		   (int)(Math.floor(((Math.log(n) / Math.log(m)))));
	}
	/*H.entrySet().stream().sorted(HashMap.Entry.<Long,Long>comparingByValue().reversed()).forEach(e->{
		long k=e.getKey();
		System.out.print(k+" ");
		  });;-*/
		  
	 /*static long pow(long n){

             while(n>0){
				 n>>=1;

			 }
	 }*/
	 //counting total bits
	 static long countBits(long number) 
	 {  
		   
		 // log function in base 2  
		 // take only integer part 
		 return (long)(Math.log(number) /  
					  Math.log(2) + 1); 
				
	 }
	 static int gcd(int a,int b){
		 if(b==0){
			 return a; 
		 }
		 return gcd(b%a,a);
	 }
	  
	   static void check() throws Exception{

	   }
	public static void main(String[] args) throws Exception {
	 int n=scan.nextInt();
if(n%7==0){
	System.out.println(2*n/7+" "+(2*n/7));
}
else{
	int max=2*(n/7);
	if(n%7<=2){
 max+=n%7;
	}
	else{
		max+=2;
	}
   int  min=2*(n/7);
	if(n%7==6){
		min+=1;
	}
	System.out.println(min+" "+max);
	
}


 }

 


	
	  }
  



	 

	










  

 


   
  
  

