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 MAXN = 100500;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  vector<bool> sieve(MAXN, true);
  sieve[1] = false;
  long long n;
  cin >> n;
  vector<bool> used(MAXN, false);
  vector<long long> trsh;
  vector<pair<long long, long long>> ans;
  vector<long long> primes;
  for (long long p = 2; p <= n / 2; p++) {
    if (sieve[p]) {
      for (long long q = p + p; q <= n; q += p) sieve[q] = false;
      primes.push_back(p);
    }
  }
  reverse(primes.begin(), primes.end());
  for (auto x : primes) {
    used[x] = true;
    vector<long long> php;
    for (long long q = x + x; q <= n; q += x) {
      if (!used[q]) {
        used[q] = true;
        php.push_back(q);
      }
    }
    php.push_back(x);
    if (php.size() % 2 == 0) {
      for (long long i = 0; i < php.size(); i += 2)
        ans.push_back({php[i], php[i + 1]});
    } else {
      trsh.push_back(php.front());
      for (long long i = 1; i < (long long)php.size() - 1; i += 2)
        ans.push_back({php[i], php[i + 1]});
    }
  }
  for (long long i = 0; i < (long long)trsh.size() - 1; i += 2)
    ans.push_back({trsh[i], trsh[i + 1]});
  cout << ans.size() << '\n';
  for (auto p : ans) {
    cout << p.first << ' ' << p.second << '\n';
  }
}