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 t[50010];
int primenum[50010];
void prime() {
  int now = 0;
  bool right;
  for (int i = 2; i <= 100010; i++) {
    right = true;
    for (int p = 2; p * p <= i; p++) {
      if (i % p == 0) right = false;
    }
    if (right) primenum[now++] = i;
  }
}
int main() {
  for (int i = 0; i < 50010; i++) primenum[i] = 9999999;
  int visit[100010];
  memset(visit, 0, sizeof(visit));
  memset(t, 0, sizeof(t));
  prime();
  int n, tot = 0, tot2;
  cin >> n;
  for (int m = 50008; m >= 0; m--) {
    tot2 = 0;
    if (primenum[m] > n) continue;
    for (int k = 1; k <= n / primenum[m]; k++) {
      if (!visit[k * primenum[m]]) {
        visit[k * primenum[m]] = primenum[m];
        tot2++;
      }
    }
    if (tot2 % 2 == 1 && tot2 > 2) visit[primenum[m] * 2] = 0;
    if (tot2 % 2 == 1 && tot2 < 2) visit[primenum[m]] = 0;
    t[m] = tot2;
    tot += tot2 / 2;
  }
  cout << tot << endl;
  int tot3;
  for (int m = 50008; m >= 0; m--) {
    tot3 = 0;
    if (primenum[m] > n) continue;
    if (t[m] / 2 >= 1) {
      for (int k = 1; k <= n / primenum[m]; k++) {
        if (visit[k * primenum[m]] == primenum[m]) {
          tot3++;
          cout << k * primenum[m];
          if (tot3 % 2 == 0)
            cout << endl;
          else
            cout << " ";
        }
      }
    }
  }
  return 0;
}