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.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class main {
	public static void main(String[] args) {
		int n = new Scanner(System.in).nextInt();
//		int n = 2;
		
		Map<Integer, HashSet<Integer>> segments = new HashMap<Integer, HashSet<Integer>>();
		HashSet<Integer> used = new HashSet<Integer>();
		List<Integer> keys = new ArrayList<Integer>();
		for (int i = 2; i <= n / 2; i++) {
			if (!used.contains(i)) {
				keys.add(i);
				segments.put(i, new HashSet<Integer>());
				//System.out.println();;
				for (int j = 1; i*j <= n; j++) {
					int t = i*j;
					if (!used.contains(t)) {
						//System.out.print(" " + t);
						used.add(t);
						segments.get(i).add(t);
					}
				}
			}
		}
		
		int ans = 0;
		for (int i = keys.size() - 1; i >= 1; i--) {
			if (segments.get(keys.get(i)).size() % 2 == 1) {
				int s=  2 * keys.get(i);
				if (segments.get(2).contains(s)) {
					segments.get(2).remove(s);
					segments.get(keys.get(i)).add(s);
				}
			}
			
			ans += segments.get(keys.get(i)).size()/2;
		}
		
		if (segments.containsKey(2))
			ans += segments.get(2).size() / 2;
		
		System.out.println(ans);
		
		for(Integer k : keys) {			
			List<Integer> current = new ArrayList<Integer>(segments.get(k));
			for (int i = 0; i < current.size() - 1; i+=2) {
				System.out.println(current.get(i) + " " + current.get(i+1));
			}			
		}
	}
}