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;
vector<int> vv, er;
int a[100005];
bool vis[100005], ok[100005];
int ans[100005][2];
int o, an, n;
void pre() {
  memset(vis, 0, sizeof(vis));
  for (int i = 2; i < 100005; i++)
    if (!vis[i])
      for (int j = i + i; j < 100005; j += i) vis[j] = 1;
  for (int i = 2; i < 100005; i++)
    if (!vis[i]) a[o++] = i;
}
void doit() {
  memset(ok, 0, sizeof(ok));
  an = 0;
  er.clear();
  for (int i = o - 1; i >= 1; i--) {
    int tmp = 0;
    vv.clear();
    for (int j = a[i]; j <= n; j += a[i])
      if (!ok[j]) {
        ok[j] = 1;
        vv.push_back(j);
        tmp++;
      }
    if (vv.size() <= 1) continue;
    if (vv.size() % 2 == 0) {
      int g = vv.size() / 2;
      for (int i = 0; i < g; i++) {
        ans[an][0] = vv[i * 2];
        ans[an][1] = vv[i * 2 + 1];
        an++;
      }
    } else {
      er.push_back(a[i] * 2);
      ans[an][0] = vv[0];
      ans[an][1] = vv[2];
      an++;
      int g = vv.size() / 2 - 1;
      for (int i = 0; i < g; i++) {
        ans[an][0] = vv[i * 2 + 3];
        ans[an][1] = vv[i * 2 + 4];
        an++;
      }
    }
  }
  for (int j = 2; j <= n; j += 2)
    if (!ok[j]) {
      ok[j] = 1;
      er.push_back(j);
    }
  int g = er.size() / 2;
  for (int i = 0; i < g; i++) {
    ans[an][0] = er[i * 2];
    ans[an][1] = er[i * 2 + 1];
    an++;
  }
  printf("%d\n", an);
  for (int i = 0; i < an; i++) printf("%d %d\n", ans[i][0], ans[i][1]);
}
int main() {
  pre();
  while (scanf("%d", &n) != EOF) doit();
}