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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.StringTokenizer;


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);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }


    static class Task {
        static int tot = 0;
        static int[] pri = new int[111111];
        static boolean[] isp = new boolean[111111];
        static boolean[] used = new boolean[111111];
        static pii[] ans = new pii[111111];
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            /*
            try{

            }catch(RuntimeException e){
                return;
            }
            */
            init();
            int n = in.nextInt();
            int c = 0;
            for(int i = 1; i < tot && pri[i] <= n / 2; i++)
            {
                int cnt = 0;
                for(int j = pri[i]; j <= n; j += pri[i])
                {
                    if(!used[j])cnt++;
                }
                int last = -1;
                boolean tmp = used[pri[i] * 2];
                if((cnt & 1) == 1)used[pri[i] * 2] = true;
                for(int j = pri[i]; j <= n; j += pri[i])
                {
                    if(!used[j])
                    {
                        if(last == -1)last = j;
                        else
                        {
                            ans[c++] = new pii(last, j);
                            last = -1;
                        }
                        used[j] = true;
                    }
                }
                if((cnt & 1) == 1)used[pri[i] * 2] = tmp;
            }
            int last = -1;
            for(int i = 2; i <= n; i += 2)
            {
                if(!used[i])
                {
                    if(last == -1)last = i;
                    else
                    {
                        ans[c++] = new pii(last, i);
                        last = -1;
                    }
                }
            }
            out.println(c);
            for(int i = 0; i < c; i++){
                out.println(ans[i].a + " " + ans[i].b);
            }
        }
        static void init(){
            isp[0] = isp[1] = true;
            for(int i = 2; i < 111111; i++)
            {
                if(!isp[i]){
                    for(int j = i + i; j < 111111; j += i)
                    {
                        isp[j] = true;
                    }
                    pri[tot++] = i;
                }
            }
        }
    }

    static class pii{
        int a;
        int b;
        pii(int aa, int bb) {
            a = aa;
            b = bb;
        }
    }

    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());
        }

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

        public BigInteger nextBigInteger() {
            return new BigInteger(next());
        }

        public BigDecimal nextBigDecimal() {
            return new BigDecimal(next());
        }

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