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.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {

	static boolean[] isPrime;
	
	static void sieve(int N)
	{
		isPrime = new boolean[N];
		Arrays.fill(isPrime, true);
		for(int i = 2; i < N; ++i)
			if(1l * i * i < N && isPrime[i])
				for(int j = i * i; j < N; j += i)
					isPrime[j] = false;
	}
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();
		sieve(n + 1);
		ArrayList<Point> ans = new ArrayList<>();
		boolean[] used = new boolean[n + 1];
		for(int i = n; i > 1; --i)
			if(isPrime[i])
			{
				ArrayList<Integer> mults = new ArrayList<Integer>(1);
				for(int j = 1; i * j <= n; ++j)
					if(!used[i * j])
					{
						mults.add(i * j);
						used[i * j] = true;
					}
				if(mults.size() == 1)
					continue;
				if(mults.size() % 2 == 1)
					used[mults.remove(1)] = false;
				for(int j = 0; j < mults.size(); j += 2)
					ans.add(new Point(mults.get(j), mults.get(j + 1)));
			}
		out.println(ans.size());
		for(Point p: ans)
			out.println(p.x + " " + p.y);
		out.flush();
		out.close();
	}

	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

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

		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 double nextDouble() throws IOException { return Double.parseDouble(next()); }

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