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 main() {
  bool b[100010] = {0}, c[100010] = {0};
  int n, i, j, p = 1, a[100010];
  vector<pair<int, int> > ans;
  cin >> n;
  for (i = 2; i <= n / 2 + 1; i++) {
    if (b[i] == 1) continue;
    a[p] = i;
    p++;
    for (j = 2 * i; j <= n / 2 + 1; j = j + i) b[j] = 1;
  }
  for (i = n / 2; i >= 2; i--) {
    if (b[i] == 0) {
      bool flg = 1, f = 0;
      int x, jj = 0, xx = 0;
      x = i;
      for (j = i * 2; j <= n; j = j + i) {
        if (c[j] == 1)
          continue;
        else if (flg == 0)
          flg = 1, x = j;
        else {
          if (f != 0)
            ans.push_back(make_pair(j, x)), c[j] = 1, c[x] = 1;
          else if (f == 0)
            jj = j, xx = x;
          flg = 0;
          f++;
        }
      }
      j -= i;
      if (c[j] == 0 && j % 2 == 1 && xx != 0 && jj != 0 && x != 0) {
        c[j] = 1;
        c[xx] = 1;
        ans.push_back(make_pair(j, xx));
      } else if (jj != 0 && xx != 0) {
        c[jj] = 1;
        c[xx] = 1;
        ans.push_back(make_pair(jj, xx));
      }
    }
  }
  cout << ans.size() << endl;
  vector<pair<int, int> >::iterator iter;
  iter = ans.begin();
  int pp = 0;
  for (iter = ans.begin(); iter != ans.end(); iter++) {
    cout << iter->first << " " << iter->second << endl;
    pp++;
  }
}