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.util.Arrays;
import java.util.ArrayList;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Random;
import java.util.HashMap;
import java.util.List;
import java.io.BufferedReader;
import java.util.Map;
import java.math.BigInteger;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author shu_mj @ http://shu-mj.com
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    Scanner in;
    PrintWriter out;

    public void solve(int testNumber, Scanner in, PrintWriter out) {
        this.in = in;
        this.out = out;
        run();
    }

    void run() {
        int n = in.nextInt();
        List<Integer> primes = new ArrayList<Integer>();
        Num.primeTable(n, primes);
        boolean[] vis = new boolean[n + 1];

        List<Ans> ans = new ArrayList<Ans>();
        for (int p : primes) {
            if (p == 2) continue;
            int cnt = 0;
            for (int i = p; i <= n; i += p) {
                if (!vis[i]) cnt++;
            }
            int ta = 1, tb = 1;
            if (cnt % 2 == 0) {
                for (int i = p; i <= n; i += p)
                    if (!vis[i]) {
                        if (cnt % 2 == 0) ta = i;
                        else {
                            tb = i;
                            vis[ta] = true;
                            vis[tb] = true;
                            ans.add(new Ans(ta, tb));
                        }
                        cnt--;
                    }
            }else {
                ta = p;
                for (int i = p * 3; i <= n; i += p) if (!vis[i]) {
                    if (cnt % 2 == 0) ta = i;
                    else {
                        tb = i;
                        vis[ta] = true;
                        vis[tb] = true;
                        ans.add(new Ans(ta, tb));
                    }
                    cnt--;
                }
            }
        }
        int ta = 2, tb = -1;
        for (int i = 4; i <= n; i += 2) if (!vis[i]) {
            if (ta == -1) {
                ta = i;
            } else {
                tb = i;
                ans.add(new Ans(ta, tb));
                ta = -1;
            }
        }
        out.println(ans.size());
        for (Ans i : ans) {
            out.println(i.a + " " + i.b);
        }
    }
    class Ans {
        int a;
        int b;

        Ans(int a, int b) {
            this.a = a;
            this.b = b;
        }
    }
}

class Scanner {
    BufferedReader br;
    StringTokenizer st;

    public Scanner(InputStream in) {
        br = new BufferedReader(new InputStreamReader(in));
        eat("");
    }

    private void eat(String s) {
        st = new StringTokenizer(s);
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public boolean hasNext() {
        while (!st.hasMoreTokens()) {
            String s = nextLine();
            if (s == null)
                return false;
            eat(s);
        }
        return true;
    }

    public String next() {
        hasNext();
        return st.nextToken();
    }

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

}

class Num {

    public static boolean[] primeTable(int n, List<Integer> primes) {
        boolean[] isPrime = new boolean[n + 1];
        Arrays.fill(isPrime, true);
        isPrime[0] = isPrime[1] = false;
        /*
        for (int i = 2; i <= n; i++) {
            if (isPrime[i]) primes.R(i);
            for (int p : primes) {
                if (i > n / p) break;
                isPrime[i * p] = false;
                if (i % p == 0) break;
            }
        }*/
        for (int i = 2; i <= n; i++) {
            if (isPrime[i]) {
                primes.add(i);
                for (int j = i + i; j <= n; j += i) {
                    isPrime[j] = false;
                }
            }
        }
        return isPrime;
    }


}