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;
vector<bool> prime;
vector<int> used;
vector<int> sieve(int n) {
  prime.resize(n + 1, true);
  used.resize(n + 1);
  prime[0] = prime[1] = false;
  int i = 2;
  vector<int> pairs;
  vector<int> rem;
  while (i <= n / 2) {
    if (prime[i]) {
      if (i != 2) pairs.push_back(i);
      bool paired = false;
      prime[2 * i] = false;
      for (int j = 3 * i; j <= n; j += i) {
        if (i != 2) {
          if (!used[j]) {
            pairs.push_back(j);
            paired = !paired;
          }
          used[j] = true;
        }
        prime[j] = false;
      }
      if (i != 2) {
        used[i] = true;
        if (!paired) {
          pairs.push_back(2 * i);
          used[2 * i] = true;
        }
      }
    }
    i++;
  }
  for (int i = 2; i <= n; i += 2) {
    if (!used[i]) rem.push_back(i);
  }
  pairs.insert(pairs.end(), rem.begin(), rem.end());
  if (pairs.size() % 2) pairs.pop_back();
  return pairs;
}
int main() {
  int n;
  cin >> n;
  vector<int> v = sieve(n);
  cout << v.size() / 2 << '\n';
  for (int i = 0; i < v.size(); i += 2) {
    cout << v[i] << " " << v[i + 1] << '\n';
  }
  return 0;
}