Problem: Jzzhu has picked n apples from his big apple tree. All the apples are numbered from 1 to n. Now he wants to sell them to an apple store. 

Jzzhu will pack his apples into groups and then sell them. Each group must contain two apples, and the greatest common divisor of numbers of the apples in each group must be greater than 1. Of course, each apple can be part of at most one group.

Jzzhu wonders how to get the maximum possible number of groups. Can you help him?

Input

A single integer n (1 ≤ n ≤ 105), the number of the apples.

Output

The first line must contain a single integer m, representing the maximum number of groups he can get. Each of the next m lines must contain two integers — the numbers of apples in the current group.

If there are several optimal answers you can print any of them.

Examples

Input

6


Output

2
6 3
2 4


Input

9


Output

3
9 3
2 4
6 8


Input

2


Output

0

Solution (in JAVA):

Solution:
import java.util.ArrayList;
import java.util.Scanner;


public class MEIN {
   static Scanner f= new Scanner(System.in);
   static ArrayList<Integer> V = new ArrayList();
   static final int LE=1000666;
   static boolean[] viz=new boolean[LE];
   static boolean[] prim=new boolean[LE];
   static int k=0;
   static int[] V2=new int[LE];
   static int[] V1=new int[LE];
   
   public static void main(String[] Args)
   {
       int n=f.nextInt();
       int i;
       int j;
       
    for(i=2;i<=n;++i)
        if (prim[i]==false)
          for( j=i+i;j<=n;j+=i)
            prim[j]=true;
      
      for(i=n;i>1;--i)
          if (prim[i]==false)
          {
              V.clear();
              int nr_viz=0;
              
              for(j=i;j<=n;j+=i)
                  if (viz[j]==false) 
                      ++nr_viz;
              
              if (nr_viz<2) continue;
               
              for(j=i;j<=n;j+=i)
                  if (viz[j]==false)
                  {
                      if (nr_viz%2!=0&&j==2*i) continue;
                      viz[j]=true;
                      V.add(j);
                  }
              nr_viz-=nr_viz%2;
             // System.out.println(nr_viz);
              
             for(j=0;j<nr_viz/2;++j)
             {
                  V1[++k]=V.get(j);
                  V2[k]=V.get(nr_viz-j-1);
             }
             
          }
     System.out.println(k);
      for(i=1;i<=k;++i)
      {
          System.out.println(V1[i]+" "+V2[i]);
      }
   }
}