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 MAXN = 100005;
bool primes[MAXN];
vector<int> p;
bool used[MAXN];
void sieve() {
  long long int i, j;
  for (i = 0; i < MAXN; ++i) primes[i] = true;
  primes[0] = primes[1] = false;
  for (i = 2; i < MAXN; ++i) {
    if (primes[i]) {
      for (j = i * i; j < MAXN; j += i) {
        primes[j] = false;
      }
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, i, j, temp;
  vector<pair<int, int>> ans;
  sieve();
  cin >> n;
  for (i = 3; i <= n / 2; ++i) {
    if (primes[i]) p.push_back(i);
  }
  set<int> rem2;
  vector<int> rem;
  for (i = 2; i <= n; ++i) {
    if (i % 2 == 0) rem2.insert(i);
  }
  for (auto it : p) {
    vector<int> temp;
    for (j = it; j <= n; j += it) {
      if (!used[j]) {
        temp.push_back(j);
      }
    }
    if (temp.size() % 2 == 0) {
      for (j = 0; j < temp.size(); j += 2) {
        used[temp[j]] = used[temp[j + 1]] = true;
        ans.push_back({temp[j], temp[j + 1]});
      }
    } else {
      rem2.insert(temp[1]);
      ans.push_back({temp[0], temp[2]});
      used[temp[0]] = used[temp[2]] = true;
      for (j = 3; j < temp.size(); j += 2) {
        used[temp[j]] = used[temp[j + 1]] = true;
        ans.push_back({temp[j], temp[j + 1]});
      }
    }
  }
  for (auto it : rem2) {
    if (!used[it]) rem.push_back(it);
  }
  if (rem.size() % 2 != 0) {
    rem.pop_back();
  }
  for (j = 0; j < rem.size(); j += 2) {
    ans.push_back({rem[j], rem[j + 1]});
  }
  cout << ans.size() << endl;
  for (auto it : ans) {
    cout << it.first << " " << it.second << endl;
  }
  return 0;
}