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.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;

public class A {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastScanner in = new FastScanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Solver solver = new Solver();
		solver.solve(in, out);
		out.close();
	}
}

class Solver {

	boolean[] isPrime;
	boolean[] used;

	List<Group> groups = new ArrayList<Group>(100000);

	static class Group {
		int a;
		int b;

		Group(int a, int b) {
			this.a = a;
			this.b = b;
		}
	}

	public void solve(FastScanner in, PrintWriter out) {

		int n = in.nextInt();

		if (n < 3) {
			System.out.println(0);
			return;
		}

		isPrime = new boolean[n + 1];
		used = new boolean[n + 1];

		Arrays.fill(isPrime, true);
		for (int i = 4; i <= n; i += 2) {
			isPrime[i] = false;
		}
		Arrays.fill(used, false);

		for (int i = 3; i <= n / 2; i++) {
			if (isPrime[i]) {
				int prev = i;
				for (int j = i * 2; j <= n; j += i) {
					isPrime[j] = false;
					if (j != i * 2 && !used[j]) {
						if (prev != -1) {
							groups.add(new Group(prev, j));
							used[prev] = true;
							used[j] = true;
							prev = -1;
						} else {
							prev = j;
						}
					}
				}
				if (prev != -1) {
					groups.add(new Group(prev, i * 2));
					used[prev] = true;
					used[i * 2] = true;
				}
			}
		}

		int prev = -1;
		for (int i = 2; i <= n; i += 2) {
			if (!used[i]) {
				if (prev != -1) {
					groups.add(new Group(prev, i));
					prev = -1;
				} else {
					prev = i;
				}
			}
		}

		out.println(groups.size());
		for (int i = 0; i < groups.size(); i++) {
			out.println(groups.get(i).a + " " + groups.get(i).b);
		}
	}
}

class FastScanner {

	private final BufferedReader in;
	private StringTokenizer st;

	public FastScanner(InputStream stream) {
		in = new BufferedReader(new InputStreamReader(stream));
	}

	public String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(in.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}

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

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

	public double nextDouble() {
		return Double.parseDouble(next());
	}

}