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 = 100011;
int n, tot, tots, ans;
int ss[maxn];
bool vis[maxn];
struct CAns {
  int x, y;
} sans[maxn];
int main() {
  int i, j, k, g;
  cin >> n;
  for (i = 0; i <= n; i++) vis[i] = false;
  tot = 0;
  ss[1] = 2;
  tots = 1;
  for (i = 3; i <= n; i++) {
    bool b = true;
    int sq = sqrt(i);
    for (j = 1; j <= tots && ss[j] <= sq; j++) {
      if (i % ss[j] == 0) {
        b = false;
        break;
      }
    }
    if (b) ss[++tots] = i;
  }
  for (i = 2; i <= tots && ss[i] <= n / 2; i++) {
    int x = ss[i];
    k = 1;
    g = x;
    for (j = x * 3; j <= n; j += x) {
      if (!vis[j]) {
        vis[j] = true;
        if (k) {
          k = 0;
          ans++;
          sans[ans].x = g, sans[ans].y = j;
        } else {
          k = 1;
          g = j;
        }
      }
    }
    if (k) {
      ans++;
      vis[2 * x] = 1;
      sans[ans].x = g, sans[ans].y = 2 * x;
    }
  }
  k = 0;
  for (i = 2; i <= n; i += 2) {
    if (!vis[i]) {
      vis[i] = 1;
      if (k) {
        k = 0;
        ans++;
        sans[ans].x = i, sans[ans].y = g;
      } else {
        k = 1;
        g = i;
      }
    }
  }
  cout << ans << endl;
  for (i = 1; i <= ans; i++) {
    cout << sans[i].x << " " << sans[i].y << endl;
  }
  return 0;
}