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.Scanner;

/**
 *
 * @author aselvarajah
 */
public class Days {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
	
    Scanner scanner = new Scanner(System.in);
    
     
    	
    int day = scanner.nextInt();
	int day2 =day;
    int lessDay =0;
    int maxDay =0;   
	
	
	
          
           
            while (day>0){
                if((day - 6) >= 0){
                    day = day-6;
                    lessDay++;
                    if((day - 1) >= 0){
                        day = day-1;
                        lessDay++;
                    }
                    else
                        break;
                }
                else 
                    break;
            }
           
          
    	 if((day2 - 1) >= 0){
             day2 = day2-1;
             maxDay++;
         }
         while (day2>0){
             if((day2 - 1) >= 0){
                 day2 = day2-1;
                 maxDay++;
                 if((day2 - 6) >= 0){
                     day2 = day2-6;
                     maxDay++;
                 }
                 else
                     break;
             }   
             else
                 break;
         }
         System.out.println(lessDay + " " +maxDay);
       
    
        
}
    
}