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 NMAX = 100005;
int N;
vector<int> primes;
bool isPrime[NMAX];
bool used[NMAX];
vector<pair<int, int> > pairs;
void sieve() {
  for (int i = 2; i <= N / 2 + 1; i++) {
    if (isPrime[i] == true) {
      primes.push_back(i);
      for (int j = i + i; j <= N / 2 + 1; j += i) {
        isPrime[j] = false;
      }
    }
  }
}
int main() {
  memset(isPrime, true, NMAX);
  memset(used, false, NMAX);
  cin >> N;
  sieve();
  int f = -1, e;
  for (int i = primes.size() - 1; i >= 1; i--) {
    for (int j = primes[i]; j <= N; j += 2 * primes[i]) {
      if (used[j] == false) {
        if (f == -1) {
          f = j;
        } else {
          e = j;
          pairs.push_back(pair<int, int>(f, e));
          used[e] = true;
          used[f] = true;
          f = -1;
        }
      }
    }
    if (f != -1) {
      e = primes[i] * 2;
      if (e <= N) {
        pairs.push_back(pair<int, int>(f, e));
        used[f] = true;
        used[e] = true;
      }
      f = -1;
    }
  }
  f = -1;
  for (int i = 2; i <= N; i += 2) {
    if (used[i] == false) {
      if (f == -1) {
        f = i;
      } else {
        e = i;
        pairs.push_back(pair<int, int>(f, e));
        used[f] = true;
        used[e] = true;
        f = -1;
      }
    }
  }
  cout << pairs.size() << endl;
  for (int i = 0; i < pairs.size(); i++) {
    cout << pairs[i].first << " " << pairs[i].second << endl;
  }
  return 0;
}