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;
std::vector<int> getPrimesUntil(int n) {
  if (n < 2) return std::vector<int>();
  std::vector<bool> sieve;
  std::vector<int> re = {2};
  sieve.resize(n + 1, true);
  bool underSqrt = true;
  for (int i = 3; i <= n; i += 2) {
    if (sieve[i]) {
      re.push_back(i);
      if (underSqrt) {
        int mult = i * i;
        if (mult > n) underSqrt = false;
        while (mult <= n) {
          sieve[mult] = false;
          mult += i;
        }
      }
    }
  }
  return re;
}
int main() {
  std::ios::sync_with_stdio(false);
  int n, i, i2, i3, p, p1, p2;
  cin >> n;
  vector<bool> used;
  vector<int> re1, re2;
  used.resize(n + 1, false);
  std::vector<int> primes = getPrimesUntil(n / 2);
  for (i = primes.size() - 1; i >= 0; i--) {
    p = primes[i];
    p1 = 0;
    p2 = p * (n / p);
    while (p2 > 0) {
      if (!used[p2]) {
        if (p1 == 0) {
          p1 = p2;
        } else {
          re1.push_back(p1);
          re2.push_back(p2);
          used[p1] = true;
          used[p2] = true;
          p1 = 0;
        }
      }
      p2 -= p;
    }
    if (re2.back() == 2 * p) {
      re2.back() = p;
      used[p] = true;
      used[2 * p] = false;
    }
  }
  cout << re1.size() << '\n';
  for (i = 0; i < re1.size(); i++) {
    cout << re1[i] << ' ' << re2[i] << '\n';
  }
  return 0;
}