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:
// Don't place your source in a package
import javax.swing.*;
import java.lang.reflect.Array;
import java.text.DecimalFormat;
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
import java.util.stream.Stream;



// Please name your class Main
public class Main {
    static FastScanner fs=new FastScanner();
    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        public String next() {
            while (!st.hasMoreElements())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        int Int() {
            return Integer.parseInt(next());
        }

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

        String Str(){
            return next();
        }
    }


    public static void main (String[] args) throws java.lang.Exception {
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        //BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        //reading /writing file
        //Scanner sc=new Scanner(new File("input.txt"));
        //PrintWriter pr=new PrintWriter("output.txt");


        int T=1;
        for(int t=0;t<T;t++){
            int n=Int();

            Solution sol=new Solution(out);
            sol.solution(n);
        }
        out.close();

    }

    public static int[] Arr(int n){
        int A[]=new int[n];
        for(int i=0;i<n;i++)A[i]=Int();
        return A;
    }
    public static int Int(){
        return fs.Int();
    }
    public static long Long(){
        return fs.Long();
    }
    public static String Str(){
        return fs.Str();
    }

}








class Solution{
    PrintWriter out;
    int INF=Integer.MAX_VALUE;
    int MOD=1000000007;
    public Solution(PrintWriter out){
        this.out=out;
    }



    public void solution(int n){
        int p[]=new int[n+1];
        List<int[]>res=new ArrayList<>();
        boolean seen[]=new boolean[n+1];
        int INF=n+10;
        for(int i=2;i<p.length;i++){
            if(p[i]!=0)continue;
            for(int j=i;j<p.length;j+=i){
                p[j]++;
            }
            p[i]=INF;
        }


        for(int i=n;i>=0;i--){
            if(i*2>n||p[i]!=INF)continue;
            List<Integer>list=new ArrayList<>();
            for(int j=i;j<=n;j+=i){
                if(!seen[j]){
                    list.add(j);
                }
            }

            if(list.size()%2==0){
                for(int j=0;j<list.size();j+=2){
                    res.add(new int[]{list.get(j),list.get(j+1)});
                    seen[list.get(j)]=true;
                    seen[list.get(j+1)]=true;
                }
            }
            else{
                int index=-1;
                for(int j=0;j<list.size();j++){
                    if(list.get(j)==i*2){
                        index=j;
                        break;
                    }
                }

                list.remove(index);

                for(int j=0;j<list.size();j+=2){
                    res.add(new int[]{list.get(j),list.get(j+1)});
                    seen[list.get(j)]=true;
                    seen[list.get(j+1)]=true;
                }
            }
        }


        out.println(res.size());
        for(int pair[]:res){
            out.println(pair[0]+" "+pair[1]);
        }
    }


}