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.
/*
     * Code Author: Akshay Miterani
     * DA-IICT
     */
    import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
     
     
    public class MainA {
     
    	static double eps=(double)1e-6;
    	static long mod=(int)1e9+7;
    	public static void main(String args[]){
    		InputReader in = new InputReader(System.in);
    		OutputStream outputStream = System.out;
    		PrintWriter out = new PrintWriter(outputStream);
    		//----------My Code----------
    		int n=in.nextInt();
    		int ac=n/7;
    		int le=n%7;
    		int min=ac*2,max=ac*2;
    		if(le>5){
    			min++;
    		}
    		if(le>=2){
    			max+=2;
    		}
    		else if(le==1){
    			max+=1;
    		}
    		out.println(min+" "+max);
    		out.close();
    		//---------------The End------------------
    		
    	}

    	
    	static long modulo(long a,long b,long c) {
    	    long x=1;
    	    	    long y=a;
    	    	    while(b > 0){
    	    	        if(b%2 == 1){
    	    	            x=(x*y)%c;
    	    	        }
    	    	        y = (y*y)%c; // squaring the base
    	    	        b /= 2;
    	    	    }
    	    	    return  x%c;
    	    	}
    	static long gcd(long x, long y)
        {
            long r=0, a, b;
            a = (x > y) ? x : y; // a is greater number
            b = (x < y) ? x : y; // b is smaller number
            r = b;
            while(a % b != 0)
            {
                r = a % b;
                a = b;
                b = r;
            }
            return r;
        }
    	static class Pair implements Comparable<Pair>{
    		int x;
    		int y;
    		int i;
    		Pair(int xx,int yy){
    			x=xx;
    			y=yy;
    		}
    		@Override
    		public int compareTo(Pair o) {
    			if(this.y>=o.y)
    				return 1;
    			else
    				return 0;
					
    		}
    	}
    	
    	static class InputReader {
    	    public BufferedReader reader;
    	    public StringTokenizer tokenizer;
     
    	    public InputReader(InputStream inputstream) {
    	      reader = new BufferedReader(new InputStreamReader(inputstream));
    	      tokenizer = null;
    	    }
    	    
    	    public String nextLine(){
    	    	String fullLine=null;
    	    	while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	            try {
    	              fullLine=reader.readLine();
    	            } catch (IOException e) {
    	              throw new RuntimeException(e);
    	            }
    	            return fullLine;
    	          }
    	          return fullLine;
    	    }
    		public String next() {
    	      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	        try {
    	          tokenizer = new StringTokenizer(reader.readLine());
    	        } catch (IOException e) {
    	          throw new RuntimeException(e);
    	        }
    	      }
    	      return tokenizer.nextToken();
    	    }
    		public long nextLong() {
    		      return Long.parseLong(next());
    		    }
    	    public int nextInt() {
    	      return Integer.parseInt(next());
    	    }
    	  }
    } 