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 N = 1e5 + 2;
bool v[N], use[N];
int main() {
  int n, i, j;
  long long T;
  vector<int> p;
  scanf("%d", &n);
  for (i = 2; i <= n; ++i) {
    if (!v[i]) {
      p.push_back(i);
      T = i;
      T *= i;
      while (T <= n) v[T] = 1, T += i;
    }
  }
  vector<pair<int, int> > ret;
  vector<int> x;
  for (i = p.size() - 1; i >= 1; --i) {
    j = p[i];
    x.clear();
    while (j <= n) {
      if (!use[j]) {
        x.push_back(j);
      }
      j = j + 2 * p[i];
    }
    for (j = 0; j < x.size(); j += 2) {
      if (j == x.size() - 1) break;
      ret.push_back(make_pair(x[j], x[j + 1]));
      use[x[j]] = 1, use[x[j + 1]] = 1;
    }
    if (x.size() & 1) {
      if (p[i] * 2 <= n) {
        ret.push_back(make_pair(x.back(), p[i] * 2));
        use[x.back()] = 1, use[p[i] * 2] = 1;
      }
    }
  }
  x.clear();
  for (i = 2; i <= n; i += 2)
    if (!use[i]) x.push_back(i);
  int sz = x.size() / 2;
  sz *= 2;
  for (i = 0; i < sz; i += 2) ret.push_back(make_pair(x[i], x[i + 1]));
  printf("%d\n", (int)ret.size());
  for (i = 0; i < ret.size(); ++i)
    printf("%d %d\n", ret[i].first, ret[i].second);
}