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 MAX = 100005;
bool primo[MAX], usd[MAX];
vector<int> fila, sobra;
vector<pair<int, int> > ans;
void criba(int n) {
  for (int i = 0; i < (int)(n + 1); i++) primo[i] = 1;
  primo[0] = primo[1] = 0;
  for (int i = 2; i * i <= n; i++) {
    if (primo[i])
      for (int j = i * i; j <= n; j += i) primo[j] = 0;
  }
}
int main() {
  int n;
  cin >> n;
  if (n < 9) {
    if (n < 4)
      cout << "0" << endl;
    else if (n < 6) {
      cout << "1" << endl;
      cout << "2 4" << endl;
    } else {
      cout << "2" << endl;
      cout << "6 3" << endl;
      cout << "2 4" << endl;
    }
  } else {
    criba(n);
    for (int i = 0; i < (int)(n + 1); i++) usd[i] = 0;
    for (int i = n / 2; i > 1; i--) {
      if (not primo[i]) continue;
      fila.clear();
      ans.push_back(make_pair(i, 2 * i));
      usd[i] = usd[2 * i] = 1;
      for (int j = 3 * i; j <= n; j += i) {
        if (not usd[j]) {
          usd[j] = 1;
          fila.push_back(j);
        }
      }
      for (int j = fila.size() - 1; j > 0; j -= 2) {
        ans.push_back(make_pair(fila[j - 1], fila[j]));
      }
      if (fila.size() % 2) sobra.push_back(fila[0]);
    }
    for (int i = 0; i + 1 < sobra.size(); i += 2) {
      ans.push_back(make_pair(sobra[i], sobra[i + 1]));
    }
    cout << ans.size() << endl;
    for (int i = 0; i < (int)(ans.size()); i++) {
      int a = ans[i].first, b = ans[i].second;
      if (a == 6)
        cout << "9 " << b << endl;
      else if (a == 9)
        cout << "6 " << b << endl;
      else if (b == 6)
        cout << a << " 9" << endl;
      else if (b == 9)
        cout << a << " 6" << endl;
      else
        cout << a << " " << b << endl;
    }
  }
  return 0;
}