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;
bool mark[100005] = {0};
bool used[100005] = {0};
vector<long long> prime;
void sieve(long long N) {
  for (long long i = (long long)(2); i <= (long long)(N); i++)
    if (!mark[i]) {
      prime.push_back(i);
      for (long long k = i * i; k <= N; k += i) mark[k] = 1;
    }
}
int main() {
  long long n;
  cin >> n;
  sieve(n);
  if (n == 1) return puts("0");
  prime.erase(prime.begin());
  long long ans = 0;
  vector<pair<long long, long long> > v;
  for (long long x : prime) {
    long long found = 1;
    list<long long> q;
    for (long long k = 2 * x; k <= n; k += x)
      if (!used[k]) q.push_back(k), found += 1;
    if (found % 2) {
      found -= 1;
      if (q.size() > 0) q.pop_front();
    }
    q.push_front(x);
    while (!q.empty()) {
      long long a = *q.begin();
      q.pop_front();
      if (q.empty()) break;
      long long b = *q.begin();
      q.pop_front();
      used[a] = used[b] = 1;
      v.push_back(make_pair(a, b));
    }
    used[x] = 1;
    ans += found / 2;
  }
  long long c = 0;
  vector<long long> left;
  for (long long i = (long long)(2); i <= (long long)(n); i++)
    if (!used[i]) c++, left.push_back(i);
  for (long long i = 0; i < c; i += 2)
    if (i + 1 < c) v.push_back(make_pair(left[i], left[i + 1]));
  cout << v.size() << '\n';
  for (auto p : v) cout << p.first << ' ' << p.second << '\n';
}