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

public class Main{
    FastScanner in;
    PrintWriter out;

    public boolean isPrime(int x) {
        if (x <= 1) return false;
        if (x <= 3) return true;
        if (x % 2 == 0) return false;
        int d = 3;
        while (d * d <= x) {
            if (x % d == 0)
                return false;
            d += 2;
        }
        return true;
    }

    public void solve()
    {
        int n = in.nextInt();
        boolean[] used = new boolean[n+1];
        int[] ans1 = new int[n];
        int[] ans2 = new int[n];
        int[] list = new int[n];
        int sz = 0;


        for (int i = 3; 2*i <= n ; i++)
        if (isPrime((i))) {
            int S = 0;
            for (int j = 1; i*j <= n; j++)
            if (!used[i*j]) {
                list[S] = i*j;
                S++;
            }

            if (S % 2 == 1) {
                for (int j = 0; j < S; j++)
                if (list[j] == 2*i) {
                    list[j] = list[S-1];
                    break;
                }
                --S;
            }

            for (int j = 0; j < S; j++) {
                ans1[sz] = list[j];
                ans2[sz] = list[j+1];
                used[list[j]] = true;
                used[list[j+1]] = true;
                ++j;
                ++sz;
            }
        }

        int last = -1;
        for (int i = 2; i <= n; i++)
        if (!used[i] && i % 2 == 0) {
            if (last == -1)
                last = i;
            else {
                ans1[sz] = last;
                ans2[sz] = i;
                ++sz;
                last = -1;
            }
        }

        out.println(sz);
        for (int i = 0; i < sz; i++) {
            out.println(ans1[i] + " " + ans2[i]);
        }
    }

    public void run()
    {
        in = new FastScanner();
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }


    public static void main(String[] args) {
        new Main().run();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

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

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

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

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