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.ArrayList;
import java.util.InputMismatchException;
import java.math.BigInteger;
import java.io.*;

/**
 * Generated by Contest helper plug-in
 * Actual solution is at the bottom
 */

public class Main {
	public static void main(String[] args) {
		InputReader in = new StreamInputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);
		run(in, out);
	}

	public static void run(InputReader in, PrintWriter out) {
		Solver solver = new Task();
		solver.solve(1, in, out);
		Exit.exit(in, out);
	}
}

abstract class InputReader {
	private boolean finished = false;

	public abstract int read();

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuffer res = new StringBuffer();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	private boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public void setFinished(boolean finished) {
		this.finished = finished;
	}

	public abstract void close();
}

class StreamInputReader extends InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar, numChars;

	public StreamInputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public void close() {
		try {
			stream.close();
		} catch (IOException ignored) {
		}
	}
}

class Exit {
	private Exit() {
	}

	public static void exit(InputReader in, PrintWriter out) {
		in.setFinished(true);
		in.close();
		out.close();
	}
}

interface Solver {
	public void solve(int testNumber, InputReader in, PrintWriter out);
}

class Task implements Solver {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int n = in.readInt();
		ArrayList<Integer> matches = new ArrayList<Integer>();
		boolean[] used = new boolean[n+1];
		for (int i = n/2; i>2; i--) {
			if (prime(i)) {
				if (even(i,n,used)) {
					int x = i;
					while (x<=n) {
				
							if (!used[x]) {
								matches.add(x);
								used[x]=true;
							}
							x+=i;
						
					}
				} else {
					matches.add(i);
					used[i] = true;
					matches.add(3*i);
					used[3*i] = true;
					int x = 4*i;
					while (x<=n) {
						
						if (!used[x]) {
							matches.add(x);
							used[x]=true;
						}
						x+=i;
					
				}
				}
			}
		}
		for (int i = 2; i<=n; i+=2) {
			if (!used[i])
				matches.add(i);
		}
		int max = matches.size() - matches.size()%2;
		out.println(max/2);
		for (int i = 0; i<max; i+=2)
			out.println(matches.get(i) + " " + matches.get(i+1));
	}
	private boolean even(int i, int n, boolean[] used) {
		int count = 0;
		for (int j = i; j<=n; j+=i) {
			if (!used[j])
				count++;
		}
		return (count%2==0);
	}
	public boolean prime(int p) {
		for (int i = 2; i*i<=p; i++) {
			if (p%i==0)
				return false;
		}
		return true;
	}
}