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<long long> v, x, y;
int main() {
  long long i, j, k, n, c = 0, z, t, m, l = 0, r, d = 0;
  cin >> n;
  long long a[n + 1], b[n + 1];
  for (i = 0; i <= n; i++) {
    a[i] = 0;
    b[i] = 0;
  }
  for (i = 2; i * i <= n; i++) {
    if (b[i] == 0) {
      for (j = i * i; j <= n; j += i) {
        b[j]++;
      }
    }
  }
  for (i = 2; i <= (n / 2); i++) {
    if (b[i] == 0) {
      v.push_back(i);
    }
  }
  k = v.size();
  l = 0;
  for (i = k - 1; i >= 0; i--) {
    d = 1;
    c = 0;
    while (d) {
      z = d * v[i];
      if (z > n) {
        if (c & 1) {
          j = 2 * v[i];
          a[j] = 0;
          j = x.size();
          j = x[j - 1];
          y[r] = j;
          x.pop_back();
        }
        d = 0;
      } else {
        if (a[z] == 0) {
          a[z]++;
          c++;
          if (c == 2) {
            r = y.size();
          }
          if (c & 1) {
            x.push_back(z);
          } else {
            y.push_back(z);
          }
        }
        d++;
      }
    }
  }
  cout << x.size() << endl;
  for (i = 0; i < x.size(); i++) {
    cout << x[i] << " " << y[i] << endl;
  }
}