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.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author beginner1010
 */
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();
    }

    static class TaskC {
        HashSet<Integer>[] factors;
        int[] nComposites;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            factors = new HashSet[n + 1];

            for (int i = 0; i <= n; i++)
                factors[i] = new HashSet<Integer>();

            nComposites = new int[n + 1];
            boolean[] vis = new boolean[n + 1];

            for (int i = 2; i + i <= n; i++)
                if (nComposites[i] == 0) {
                    for (int j = i; j <= n; j += i) {
                        if (vis[j] == false) {
                            vis[j] = true;
                            nComposites[i]++;
                            factors[i].add(j);
                        }
                    }
                }

            int ans = 0;
            for (int i = n; i >= 2; i--)
                if (nComposites[i] != 0) {
                    if (nComposites[i] % 2 == 1) {
                        nComposites[2]--;
                        nComposites[i]++;
                        factors[2].remove(i * 2);
                        factors[i].add(i * 2);
                    }
                    ans += nComposites[i] / 2;
                }

            out.println(ans);
            for (int i = n; i >= 2; i--)
                if (nComposites[i] != 0) {
                    ArrayList<Integer> A = new ArrayList<Integer>(factors[i]);
                    for (int j = 1; j < A.size(); j += 2) {
                        out.println(A.get(j - 1) + " " + A.get(j));
                    }
                }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

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

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

    }
}