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 PYTHON3):

Solution:
def find_primes(p):
    nums = list(range(3,p + 1))
    divisors=[2]
    for num in nums:
        check=0
        res = True
        while divisors[check] <= num**(1/2):
            if num % divisors[check] == 0:
                res = False
                break
            check += 1
        if res:
            divisors.append(num)
    divisors.reverse()
    return divisors

num = int(input())
nums = set(range(2,num + 1))
check = dict()
for i in range(1,num+1):
    check[i] = False
primes = find_primes(num//2)
results = []
for prime in primes:
    if prime > num // 2:
        break
    considering = []
    for x in range(1, num // prime+1):
        if not check.get(x * prime):
            considering.append(x * prime)
            check[x * prime] = True
    if len(considering) % 2 != 0:
        considering.remove(prime * 2)
        check[prime*2] = False
    adding = [(considering[i], considering[i+1]) for i in range(0,len(considering),2)]
    results += adding
nums = [x for x in nums if x % 2 == 0 and not check.get(x)]
if len(nums) % 2 != 0:
    nums.pop()
results += [(nums[i], nums[i+1]) for i in range(0,len(nums),2)]
print(len(results))
for res in results:
    print(res[0], res[1])