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 inf = (int)1e9;
const double pi = acos(-1.0);
const double eps = 1e-9;
const int mod = inf + 7;
vector<int> g, q;
int v[300100], m, w[300100], u[300100], n;
vector<pair<int, int> > res;
int main() {
  cin >> n;
  for (long long i = 2; i <= n; i++) {
    if (u[i]) continue;
    g.push_back(i);
    for (long long j = i * i; j <= n; j += i) {
      u[j] = 1;
    }
  }
  if (n <= 3) {
    cout << 0 << endl;
    return 0;
  }
  reverse(g.begin(), g.end());
  for (int i = 0; i < (int)g.size(); i++) {
    int x = g[i];
    m = 0;
    for (int j = x; j <= n; j += x)
      if (!w[j]) {
        v[m++] = j;
        w[j] = 1;
      }
    if (m == 1) {
      w[x] = 0;
      continue;
    }
    if (m & 1) {
      w[x + x] = 0;
      bool ok = 0;
      for (int j = 1; j < m; j++) v[j] = v[j + 1];
      m--;
      for (int j = 0; j < m; j += 2) res.push_back(make_pair(v[j], v[j + 1]));
    } else {
      for (int j = 0; j < m; j += 2) res.push_back(make_pair(v[j], v[j + 1]));
    }
  }
  cout << (int)res.size() << endl;
  for (int i = 0; i < (int)res.size(); i++)
    cout << res[i].first << " " << res[i].second << endl;
  return 0;
}