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

Solution:
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 5;
int a[MAXN], vis[MAXN];
int d[MAXN], p[MAXN];
int primes[MAXN], cnt;
int st[MAXN];
void get_primes(int n) {
  st[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!st[i]) primes[cnt++] = i;
    for (int j = 0; primes[j] <= n / i; j++) {
      st[primes[j] * i] = 1;
      if (i % primes[j] == 0) break;
    }
  }
}
int num[MAXN];
int main() {
  int n;
  scanf("%d", &n);
  get_primes(n);
  int tot = 0;
  for (int i = cnt - 1; i >= 0; i--) {
    int tot1 = 0;
    for (int i1 = primes[i]; i1 <= n; i1 += primes[i]) {
      if (vis[i1] == 0) {
        num[tot1++] = i1;
      }
    }
    if (tot1 % 2 != 0) swap(num[1], num[tot1 - 1]);
    for (int j = 0; j < tot1; j += 2) {
      if (j + 1 <= tot1 - 1) {
        d[tot] = num[j], p[tot] = num[j + 1];
        vis[d[tot]] = 1, vis[p[tot]] = 1;
        tot++;
      }
    }
  }
  printf("%d\n", tot);
  for (int i = 0; i < tot; i++) {
    printf("%d %d\n", d[i], p[i]);
  }
  return 0;
}