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 MAXN = 1e5 + 5;
bool isprime[MAXN];
int prime[MAXN];
void euler() {
  memset(isprime, true, sizeof isprime);
  isprime[1] = false;
  for (int i = 2; i < MAXN; i++) {
    if (isprime[i]) prime[++prime[0]] = i;
    for (int j = 1; j <= prime[0] && i * prime[j] < MAXN; j++) {
      isprime[i * prime[j]] = false;
      if (i % prime[j] == 0) break;
    }
  }
}
bool vis[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  euler();
  cin >> n;
  vector<pair<int, int>> ans;
  for (int i = n / 2; i >= 2; i--) {
    if (!isprime[i]) continue;
    vector<int> v;
    v.push_back(i);
    for (int j = 3; i * j <= n; j++)
      if (!vis[i * j]) v.push_back(i * j);
    reverse(v.begin(), v.end());
    while (v.size() >= 2) {
      auto a = v.back();
      v.pop_back();
      auto b = v.back();
      v.pop_back();
      vis[a] = true;
      vis[b] = true;
      ans.push_back({a, b});
    }
    if (v.size() && !vis[2 * i]) {
      ans.push_back({2 * i, v.back()});
      vis[v.back()] = true;
      vis[2 * i] = true;
    }
  }
  cout << ans.size() << "\n";
  for (auto &x : ans) cout << x.first << " " << x.second << "\n";
  return 0;
}