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;
int vst[100010], flag[100010];
int p[100010];
vector<int> vt;
int main() {
  int n;
  scanf("%d", &n);
  vst[1] = 1;
  for (int i = 2; i < 100010; i++) {
    if (vst[i]) continue;
    for (int j = 2 * i; j < 100010; j += i) vst[j] = 1;
  }
  int k = 0;
  for (int i = 1; i <= n; i++) {
    if (vst[i]) continue;
    p[++k] = i;
  }
  int r = k + 1;
  for (int i = 1; i <= k; i++) {
    if (p[i] * 2 > n) {
      r = i;
      break;
    }
  }
  int ans = n - k + r - 2;
  printf("%d\n", ans / 2);
  for (int i = 2; i < r; i++) {
    int x = 0;
    for (int j = 2 * p[i]; j <= n; j += p[i]) {
      if (flag[j]) continue;
      if (j % 2 == 0) continue;
      if (x == 0) {
        x = j;
        continue;
      } else if (x) {
        printf("%d %d\n", x, j);
        flag[j] = 1;
        flag[x] = 1;
        x = 0;
      }
    }
    if (x) {
      printf("%d %d\n", p[i], x);
      flag[p[i]] = 1;
      flag[x] = 1;
    } else if (x == 0)
      vt.push_back(p[i]);
  }
  for (int i = 0; i < vt.size(); i++) {
    printf("%d %d\n", vt[i], 2 * vt[i]);
    flag[2 * vt[i]] = 1;
    flag[vt[i]] = 1;
  }
  int y = 0;
  for (int i = 2; i <= n; i += 2) {
    if (flag[i]) continue;
    if (y == 0) {
      y = i;
      continue;
    } else if (y) {
      printf("%d %d\n", y, i);
      y = 0;
      flag[y] = 1;
      flag[i] = 1;
      continue;
    }
  }
  return 0;
}