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 e_contest_5;

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

public class JzzhuAndApples {
	static class pair{
		int one, two;
		public pair(int one, int two) {
			this.one = one;
			this.two= two;
		}
	}
	static ArrayList<Integer> primes;
	static boolean [] prime;
	static void gen() {
		prime = new boolean[(int)1e6];
		primes =new ArrayList<Integer>();
		Arrays.fill(prime, true);
		for (int i = 2; i < 1000; i++) {
			if(prime[i])
				for (int j = i*i; j < prime.length; j+=i) {
					prime[j] = false;
				}
		}
		for (int j = 3; j < prime.length; j++) {
			if(prime[j])
				primes.add(j);
		}
	}
public static void main(String[] args) throws IOException{
	Scanner sc= new Scanner(System.in);
	int n = sc.nextInt();
	ArrayList<pair> ar = new ArrayList<pair>();
	boolean [] taken= new boolean[n+1];
	gen();
	for (int k = 0; k <primes.size(); k++) {
			if(primes.get(k)>n)
				break;
			int i = primes.get(k);
			if(taken[i])
				continue;
			int one = i;
			int count = ar.size();
		for (int j = i*2; j <= n; j+=i) {
//			if(j==99)
//				System.out.println("cheese"+" "+taken[j]+" "+one);
//			System.out.println(Arrays.toString(taken));
			if(taken[j])
				continue;
			if(one!=-1) {
				ar.add(new pair(one,j));
				taken[one]=true;
				one = -1;
				taken[j]=true;
//				if(one==99)
//					System.out.println(i+"herere");
			}
			else 
				one=j;
		}
//		if(i==3)
//		System.out.println(taken[99]);
		if(one!=-1&&one!=i) {
			taken[2*i]=false;
//			if()
			ar.remove(count);
			taken[one] = true;
			ar.add(new pair(one,i));
		}
	}
	int one = 2;
	for (int i = 4; i < taken.length; i+=2) {
		if(taken[i])
			continue;
		if(one==-1)
			one = i;
		else {
			ar.add(new pair(one, i));
			one = -1;
		}
	}
	System.out.println(ar.size());
	for (int i = 0; i < ar.size(); i++) {
		System.out.println(ar.get(i).one+" "+ar.get(i).two);
	}
}
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();}

}
}