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.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int N = in.nextInt();
        boolean[] isComp = new boolean[N + 1];
        ArrayList<Integer> ans = new ArrayList<Integer>();
        ArrayList<Integer> extra = new ArrayList<Integer>();
        boolean[] used = new boolean[N + 1];

        for (int i = 2; i <= N; i++) {
            if ((i & 1) > 0 && !isComp[i]) {
                int crt = 0;
                for (int j = i + i; j <= N; j += i) {
                    isComp[j] = true;
                    if (j > i + i && !used[j]) {
                        ans.add(j);
                        used[j] = true;
                        crt++;
                    }
                }

                if (i + i <= N) {
                    ans.add(i);
                    used[i] = true;
                    crt++;

                    if ((crt & 1) > 0) {
                        ans.add(i + i);
                    }
                    else {
                        extra.add(i + i);
                    }
                    used[i + i] = true;
                }
            }
            else if ((i & 1) == 0 && !used[i]) {
                extra.add(i);
                used[i] = true;
            }
        }

        for (int i = 0; i + 1 < extra.size(); i += 2) {
            ans.add(extra.get(i));
            ans.add(extra.get(i + 1));
        }

        out.println(ans.size() / 2);
        for (int i = 0; i < ans.size(); i += 2) {
            out.println(ans.get(i) + " " + ans.get(i + 1));
        }
    }
}

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

    public InputReader(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 int nextInt() {
        return Integer.parseInt(nextString());
    }

    public String nextString() {
        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;
    }

}