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:
// package CF;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class F {
	
	public static void main(String[] args) throws Exception
	{
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int res = 0;
		boolean [] pr = new boolean[n+1];
		Arrays.fill(pr, true);
		pr[0] = pr[1] = false;
		for (int i = 3; i < pr.length; i+=2) {
			if(!pr[i]) continue;
			int num = 0;
			for (int j = i; j < pr.length; j+=i) {
				if(pr[j]) num++;
			}
			int tmp = -1;
			for (int j = i; j < pr.length; j+=i) {
				if(!pr[j] || i*2 < pr.length && j == i*2 && num % 2 != 0)
					continue;
				pr[j] = false;
				if(tmp != -1){
					res++;
					sb.append(tmp).append(" ").append(j).append("\n");
					tmp = -1;
				}
				else tmp = j;
			}
			
		}
		int tmp = -1;
		for (int i = 2; i < pr.length; i+=2) {
			if(!pr[i]) continue;
			if(tmp != -1){
				res++;
				sb.append(tmp).append(" ").append(i).append("\n");
				tmp = -1;
			}
			else tmp = i;
		}
		out.println(res);
		out.print(sb);
		out.flush();
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s)
		{
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(FileReader fileReader)
		{
			br = new BufferedReader(fileReader);
		}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException
		{
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException
		{
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException
		{
			return br.readLine();
		}

		public boolean ready() throws IOException
		{
			return br.ready();
		}
	}
}