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;
bool prime[100001];
const long long N = 100000;
vector<long long> v;
void init() {
  prime[1] = 1;
  for (long long i = (2), _b = (N); i <= _b; i++) {
    if (!prime[i]) {
      v.push_back(i);
      for (long long j = i + i; j <= N; j += i) {
        prime[j] = 1;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  init();
  if (n < 3) {
    cout << 0 << endl;
    return 0;
  }
  vector<pair<long long, long long> > ans;
  bool done[n + 1];
  memset((done), 0, sizeof((done)));
  for (long long i = v.size() - 1; i >= 0; i--) {
    long long num = v[i];
    if (num > n / 2) continue;
    vector<long long> vv;
    for (long long j = num; j <= n; j += num) {
      if (!done[j]) {
        vv.push_back(j);
      }
    }
    bool hm = 1;
    if (vv.size() % 2 == 0) hm = 0;
    bool hu = 0;
    long long prev = 0;
    for (long long j = 0, _n = (vv.size()); j < _n; j++) {
      if (j == 1 && hm) continue;
      if (hu) {
        ans.push_back(make_pair(prev, vv[j]));
        done[prev] = 1;
        done[vv[j]] = 1;
        hu = 0;
      } else {
        prev = vv[j];
        hu = 1;
      }
    }
  }
  cout << ans.size() << endl;
  for (long long i = 0, _n = (ans.size()); i < _n; i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
}