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

Solution:
# coding:utf-8

def get_primes(max_value):
    a = [True]*(n+1)
    a[0] = False
    a[1] = False
    ans = []
    for i in range(n+1):
        if True == a[i]:
            ans.append(i)
            for j in range(i*i, n+1, i):
                a[j] = False
    return ans

n = input()
primes = get_primes(n)
ans = []
num = [True]*(n+1)
for item in primes:
    if item != 2:
        tmp_cnt = 0
        for tmp in range(item, n+1, item):
            if num[tmp]:
                tmp_cnt += 1
        # 存在奇数个的时候先把2*item标记为已使用，等配对完成之后标记回去.
        if tmp_cnt == 1:
            num[item] = False
        elif 1 == tmp_cnt % 2:
            num[item*2] = False
        # 开始偶数形式配对
        tmps = []
        for tmp in range(item, n+1, item):
            if num[tmp]:
                tmps.append(tmp)
        for i in range(0, len(tmps), 2):
            ans.append((tmps[i], tmps[i+1]))
            num[tmps[i]] = False
            num[tmps[i+1]] = False
        if 1 == tmp_cnt % 2 and tmp_cnt > 1:
            num[2*item] = True
# 最后处理2的倍数
tmps = []
for tmp in range(2, n+1, 2):
    if num[tmp]:
        tmps.append(tmp)
start_index = 0
if len(tmps) % 2 == 1:
    start_index = 1
for i in range(start_index, len(tmps), 2):
    ans.append((tmps[i], tmps[i+1]))
print len(ans)
for item in ans:
    a,b = item
    print a,b