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.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class C {

    public List<Pair> solve(int n) {
        List<Pair> pairList = new ArrayList<>();
        boolean[] used = new boolean[n+1];
        boolean[] prime = new boolean[n+1];
        Arrays.fill(prime, true);
        for (int a=3; a*2<=n; a+=2) {
            if (!prime[a])
                continue;
            List<Integer> list = new ArrayList<>();
            for (int b=a; b<=n; b+=a) {
                if (!used[b]) {
                    list.add(b);
                    used[b] = true;
                }
                prime[b] = false;
            }
            if (list.size()%2==1) {
                used[list.get(1)] = false;
                list.remove(1);
            }
            for (int i=0; i<list.size(); i+=2)
                pairList.add(new Pair(list.get(i), list.get(i+1)));
        }
        List<Integer> list = new ArrayList<>();
        for (int a=2; a<=n; a+=2)
            if (!used[a])
                list.add(a);
        if (list.size()%2==1)
            list.remove(list.size()-1);
        for (int i=0; i<list.size(); i+=2)
            pairList.add(new Pair(list.get(i), list.get(i+1)));
        return pairList;
    }
    
    private class Pair {
        private int a, b;
        private Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }
    }
    
    public static void main(String args[]) throws IOException {
        BufferedReader br = null;
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            String[] split = line.split(" ");
            int n = Integer.parseInt(split[0]);
            List<Pair> res = new C().solve(n);
            System.out.println(res.size());
            for (int i=0; i<res.size(); i++)
                System.out.println(res.get(i).a + " " + res.get(i).b);
        } finally {
            if (br!=null)
                br.close();
        }
    }
}