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.*;
import java.util.*;

public class Main {
    private static PrintWriter out;
    private static FastReader in;

    private static class FastReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public FastReader(InputStream inputStream) {
            reader = new BufferedReader(
                    new InputStreamReader(inputStream), 1 << 16);
            tokenizer = null;
        }

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

        public String nextLine() {
            try {
                return reader.readLine();
            }
            catch (IOException ex) {
                throw new RuntimeException(ex);
            }
        }

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

    }

    public static void main(String[] args) throws FileNotFoundException {
        in = new FastReader(System.in);
        out = new PrintWriter(System.out);

        int n = in.nextInt();
        int[] visited = new int[n + 1];
        Arrays.fill(visited, 0);
        ArrayList<Integer> visitedNums = new ArrayList<Integer>();
        int answer = 0;
        for (int i = 3; i <= n / 2; i += 2) {
            if (visited[i] == 0) {
                visitedNums.clear();
                for (int j = i; j <= n; j += i) {
                    if (j == 2 * i)
                        continue;
                    else {
                        if (visited[j] == 0)
                            visitedNums.add(j);
                    }
                }
                int count = visitedNums.size();
                for (int j = 0; j < count - 1; j += 2) {
                    int first  = visitedNums.get(j),
                        second = visitedNums.get(j + 1);
                    visited[first]  = second;
                    visited[second] = first;
                    ++answer;
                }
                if ((count & 1) == 1) {
                    int first  = visitedNums.get(count - 1),
                        second = 2 * i;
                    visited[first]  = second;
                    visited[second] = first;
                    ++answer;
                }
            }
        }
        int current = 0;
        for (int i = 2; i <= n; i += 2) {
            if (visited[i] != 0)
                continue;
            if (current != 0) {
                visited[current] = i;
                visited[i] = current;
                answer++;
                current = 0;
            }
            else {
                current = i;
            }
        }

        out.println(answer);
        for (int i = 2; i <= n; ++i) {
            if (visited[i] > i)
                out.println(i + " " + visited[i]);
        }
        out.flush();
    }

}