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.*;
/*

7
1 0 1 0 1 0 1
1 2
2 3
3 4
4 5
3 6
6 7

 */
public class c
{
	public static void main(String[] arg) throws IOException
	{
		new c();
	}
	public c() throws IOException
	{
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		boolean[] isPrime = new boolean[n+1];
		boolean[] isPaired = new boolean[n+1];
		Arrays.fill(isPrime, true);
		isPrime[0] = false;
		isPrime[1] = false;
		for(int i = 4; i <= n; i+=2) isPrime[i] = false;
		for(int i = 3; i*i <= n; i+=2)
		{
			if(isPrime[i])
			{
				for(int j = i+i; j <= n; j+=i)
				{
					isPrime[j] = false;
				}
			}
		}
		int cnt = 0;
		StringBuilder sb = new StringBuilder();
		for(int i = 3; i <= n; i+=2)
		{
			if(isPrime[i] && !isPaired[i])
			{
				ArrayList<Integer> list = new ArrayList<Integer>();
				for(int j = i; j <= n; j+=i)
				{
					if(!isPaired[j])
					{
						isPaired[j] = true;
						list.add(j);
					}
				}
				cnt += list.size()/2;
				if(list.size() == 1) continue;
				if(list.size()%2 == 0)
				{
					for(int j = 0; j < list.size(); j+=2)
					{
						sb.append(list.get(j) + " " + list.get(j+1)+"\n");
					}
				}
				else
				{
					sb.append(list.get(0) + " " + list.get(2) + "\n");
					isPaired[list.get(1)] = false;
					for(int j = 3; j < list.size(); j +=2)
					{
						sb.append(list.get(j) + " " + list.get(j+1)+"\n");
					}
				}
			}
		}
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i = 2; i <= n; i++)
		{
			if(!isPaired[i]) list.add(i);
		}
		cnt += list.size()/2;
		for(int i = 0; i+1 < list.size(); i+=2)
		{
			sb.append(list.get(i) + " " + list.get(i+1)+"\n");
		}
		out.println(cnt);
		out.print(sb.toString());
		in.close(); out.close();
	}
	class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;
		public FastScanner(InputStream in)
		{
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}
		public String next() throws IOException
		{
			while(!st.hasMoreElements()) st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int nextInt() throws IOException
		{
			return Integer.parseInt(next());
		}
		public void close() throws IOException
		{
			br.close();
		}
	}
}