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:
//package practice.E;

import java.io.*;
import java.util.StringTokenizer;

public class CF449 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);

        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        int cnt = 0;
        boolean[] taken = new boolean[n+1];
        for (int i = 3; i <= n; i++) {
            if(isPrime(i)){
                int c = 0;
                for (int j = i; j <= n; j+=i) {
                    if(taken[j])
                        continue;
                    c++;
                }

                int fst = -1;
                for (int j = i; j <= n; j+=i) {
                    if(taken[j])
                        continue;
                    if(c%2 == 1 && j == 2*i)
                        continue;
                    if(fst == -1)
                        fst = j;
                    else{
                        taken[fst] = true;
                        taken[j] = true;
                        sb.append(fst + " " + j + "\n");
                        cnt++;
                        fst = -1;
                    }
                }
            }
        }

        int fst = -1;
        for (int j = 2; j <= n; j+=2) {
            if(taken[j])
                continue;
            if(fst == -1)
                fst = j;
            else{
                taken[fst] = true;
                taken[j] = true;
                sb.append(fst + " " + j + "\n");
                cnt++;
                fst = -1;
            }

        }

        pw.println(cnt);
        pw.print(sb);

        pw.flush();
        pw.close();
    }

    static boolean isPrime(int x){
        for (int i = 2; i*i <= x; i++) {
            if(x%i == 0)
                return false;
        }
        return true;
    }
    static class Scanner
    {
        StringTokenizer st; BufferedReader br;
        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}
        public Scanner(String s) throws FileNotFoundException {	br = new BufferedReader(new FileReader(new File(s)));}
        public String next() throws IOException {while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());return st.nextToken();}
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public long nextLong() throws IOException {return Long.parseLong(next());}
        public String nextLine() throws IOException {return br.readLine();}
        public boolean ready() throws IOException {return br.ready();}
    }
}