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 JzzhuAndApples
{
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n = in.nextInt();
		
		boolean[] used = new boolean[n + 1];
		ArrayList<Pair> pairs = new ArrayList<Pair>();
		ArrayList<Integer> two = new ArrayList<Integer>();
		for(int x = 3; x <= n; x++)
		{
			if(!used[x])
			{
				ArrayList<Integer> current = new ArrayList<Integer>();
				for(int y = x; y <= n; y += x)
				{
					if(!used[y])
					{
						current.add(y);
						used[y] = true;
					}
				}
				
				if(current.size() % 2 == 0)
				{
					for(int z = 0; z < current.size(); z += 2)
					{
						pairs.add(new Pair(current.get(z), current.get(z + 1)));
					}
				}
				else
				{
					if(current.size() > 1)
					{
						two.add(current.get(1));
						pairs.add(new Pair(current.get(0), current.get(2)));
						for(int a = 3; a < current.size(); a += 2)
						{
							pairs.add(new Pair(current.get(a), current.get(a + 1)));
						}
					}
					else
					{
						if(current.get(0) % 2 == 0)
						{
							two.add(current.get(0));
						}
					}
				}
			}
		}
		
		two.add(2);
		
		for(int b = 0; b < two.size() - 1; b += 2)
		{
			pairs.add(new Pair(two.get(b), two.get(b + 1)));
		}
		
		out.println(pairs.size());
		for(Pair p : pairs)
		{
			out.println(p.a + " " + p.b);
		}
		
		out.close();
	}
	
	static class Pair
	{
		int a;
		int b;
		
		public Pair(int a, int b)
		{
			this.a = a;
			this.b = b;
		}
	}
}