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.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	while (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }
    
    private int nextInt() throws Exception{
	return Integer.parseInt(next());
    }
    
    List<Integer> primes;
    List<int[]> ret;
    int []lp;
    
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);
	int n = nextInt();
	
	primes = new ArrayList<Integer>();
	lp = new int[n/2+1];
	for(int i=2;i<=n/2;i++){
	    if (lp[i] == 0){
		lp[i] = i;
		primes.add(i);
	    }
	    for(int j=0;j<primes.size() && primes.get(j) <= lp[i] && i * primes.get(j) <= n/2;j++){
		lp[i * primes.get(j)] = primes.get(j);
	    }
	}
	
	ret = new LinkedList<int[]>();
	
	boolean []used = new boolean[n+1];
	for(int i=0;i<primes.size();i++){
	    int num = primes.get(i);
	    if (num == 2) continue;
	    int m = 0;
	    for(int j=1;j*num<=n;j++){
		if (!used[j * num]){
		    m++;
		}
	    }
	    if (m % 2 == 0){
		int j = 1, a = -1;
		while(j * num <= n){
		    if (!used[j * num]){
			if (a == -1){
			    a = j * num;
			}else{
			    ret.add(new int[]{a, j * num});
			    a = -1;
			}
			if (j * num == 2){
			    System.out.println("here");
			}
			used[j * num] = true;
		    }
		    j++;
		}
	    }else{
		int j = 1, a = -1;
		while(j * num <= n){
		    if (j == 2){
			j++;
			continue;
		    }
		    if (!used[j * num]){
			if (a == -1){
			    a = j * num;
			}else{
			    ret.add(new int[]{a, j * num});
			    a = -1;
			}
			used[j * num] = true;
		    }
		    j++;
		}
	    }
	}
	
	int j = 1, a = -1;
	while(j * 2 <= n){
	    if (!used[j * 2]){
		if (a == -1){
		    a = 2 * j;
		}else{
		    ret.add(new int[]{a, 2 * j});
		    a = -1;
		}
		used[j * 2] = true;
	    }
	    j++;
	}
	
	out.println(ret.size());
	for(int []i : ret){
	    out.println(i[0] + " " + i[1]);
	}
        out.close();
    }

    public static void main(String args[]) throws Exception{
	new Main().run();
    }
}