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 long long INF = 1e9;
const long long MOD = 1e9 + 7;
const int MAXN = 1e5 + 100;
bool isprime[MAXN];
vector<int> prime;
vector<int> v;
int pem, n;
vector<pair<int, int> > res;
bool sudah[MAXN];
vector<int> simpan;
void sieve() {
  isprime[1] = false;
  for (int i = 2; i <= MAXN - 50; i++) {
    if (isprime[i]) {
      if (i > n / 2)
        break;
      else
        prime.push_back(i);
      for (int j = i + i; j < MAXN - 50; j += i) isprime[j] = false;
    }
  }
  reverse(prime.begin(), prime.end());
  for (int i = 0; i < prime.size(); i++) {
    int now = prime[i];
    vector<int> sek;
    for (int j = now; j <= n; j += now) {
      if (sudah[j]) continue;
      sudah[j] = 1;
      sek.push_back(j);
    }
    if (now == 2) {
      for (int j = 0; j < simpan.size(); j++) sek.push_back(simpan[j]);
      if (sek.size() % 2 == 1) sek.pop_back();
      for (int j = 0; j < sek.size(); j += 2)
        res.push_back(make_pair(sek[j], sek[j + 1]));
      break;
    }
    if (sek.size() % 2 == 1) {
      simpan.push_back(sek[1]);
      res.push_back(make_pair(sek[0], sek[2]));
      for (int j = 3; j < sek.size(); j += 2)
        res.push_back(make_pair(sek[j], sek[j + 1]));
    } else {
      for (int j = 0; j < sek.size(); j += 2)
        res.push_back(make_pair(sek[j], sek[j + 1]));
    }
  }
  cout << res.size() << '\n';
  for (int i = 0; i < res.size(); i++)
    cout << res[i].first << ' ' << res[i].second << '\n';
  return;
}
int main() {
  for (int i = 0; i < MAXN; i++) isprime[i] = true;
  cin >> n;
  sieve();
}