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 N = 1e5 + 111;
vector<int> prime;
bool vis[N];
void init(int n) {
  for (int i = 2; i <= n; ++i) {
    if (!vis[i]) {
      prime.push_back(i);
    }
    for (int j = i; j <= n; j += i) {
      vis[j] = true;
    }
  }
}
vector<int> get_frac(int x) {
  vector<int> frac;
  for (auto p : prime) {
    while (x % p == 0) {
      x /= p;
      frac.push_back(p);
    }
  }
  return frac;
}
bool vis2[N];
int main() {
  int n;
  cin >> n;
  init(n);
  vector<pair<int, int>> ans;
  reverse(prime.begin(), prime.end());
  vector<int> other;
  for (auto p : prime) {
    int cnt = 0;
    vector<int> v;
    for (int i = p; i <= n; i += p) {
      if (vis2[i]) {
        continue;
      }
      vis2[i] = true;
      v.push_back(i);
      cnt += 1;
    }
    if (cnt == 1) {
      continue;
    }
    if (cnt % 2 == 0) {
    } else {
      other.push_back(v[1]);
      swap(v[1], v[cnt - 1]);
    }
    for (int i = 0; i + 1 < cnt; i += 2) {
      ans.push_back(make_pair(v[i], v[i + 1]));
    }
  }
  for (int i = 0; i + 1 < other.size(); i += 2) {
    ans.push_back(make_pair(other[i], other[i + 1]));
  }
  cout << ans.size() << endl;
  for (auto it : ans) {
    cout << it.first << " " << it.second << endl;
  }
}