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.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.StringTokenizer;


public class Abood2D {


	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n , m = sc.nextInt();
		n = m;

		boolean[] v = new boolean[n + 1];
		boolean[] NP = new boolean[n + 1];
		int[] ans = new int[n + 1];
		int c = 0;

		ArrayList<Integer> e = new ArrayList<>();

		for (int i = 2; i < ans.length; i+=2)
			NP[i] = true;

		for (int i = 3; i <= n; i++) {
			if(!v[i] && !NP[i]) {
				ArrayList<Integer> a = new ArrayList<>();
				for (int j = i; j < v.length; j+=i)
					if(!v[j]) {
						a.add(j);
						v[j] = true;
					}
				if(a.size() == 1)
					continue;
				if(a.size() %2 == 0)
					for (int j = 0; j < a.size() - 1; j+=2){
						ans[a.get(j)] = a.get(j + 1);
						c++;
					}
				else {
					ans[a.get(0)] = a.get(2);
					c++;
					e.add(a.get(1));
					for (int j = 3; j < a.size() - 1; j+=2){
						ans[a.get(j)] = a.get(j + 1);
						c++;
					}

				}

			}
		}

		for (int i = 2; i < ans.length; i+=2)
			if(!v[i]) {
				e.add(i);
			}

		for (int i = 0; i < e.size() - 1; i+=2) {
			ans[e.get(i)] = e.get(i + 1);
			c++;
		}


		out.println(c);

		for (int i = 2; i <= n; i++)
			if(ans[i] != 0)
				out.println(i + " " + ans[i]);

		out.flush();

	}



	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
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

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



	}


}