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;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long qpow(long long a, long long b, long long modd) {
  long long ans = 1, base = a;
  while (b) {
    if (b & 1) {
      ans = (ans * base) % modd;
    }
    base = (base * base) % modd;
    b >>= 1;
  }
  return ans;
}
const int N = 1e5 + 5;
int vis[N], vis1[N];
vector<int> ans, prime;
void getprime() {
  for (int i = 2; i <= N - 5; ++i) {
    if (!vis[i]) {
      prime.push_back(i);
    }
    for (int p : prime) {
      int v = p * i;
      if (v > N - 5) break;
      vis[v] = 1;
      if (i % p == 0) break;
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  getprime();
  for (int p : prime) {
    if (p == 2) continue;
    if (p > n / 2) break;
    int cnt = 1;
    ans.push_back(p);
    vis1[p] = 1;
    for (int i = n / 2; i > 2; --i) {
      long long v = (long long)p * i;
      if (v > n) continue;
      if (!vis1[v]) {
        ans.push_back(v);
        cnt++;
        vis1[v] = 1;
      }
    }
    if (cnt % 2) {
      if (!vis1[2 * p] && 2 * p <= n) {
        vis1[2 * p] = 1;
        ans.push_back(2 * p);
      } else {
        vis1[ans.back()] = 0;
        ans.pop_back();
      }
    }
  }
  int cnt = 1;
  ans.push_back(2);
  int v;
  for (int i = 2; i <= n; ++i) {
    v = i * 2;
    if (v > n) break;
    if (!vis1[v]) {
      ans.push_back(v);
      vis1[v] = 1;
      ++cnt;
    }
  }
  if (cnt % 2) {
    ans.pop_back();
  }
  int siz = ans.size();
  cout << siz / 2 << '\n';
  for (int i = 0; i < siz; ++i) {
    if (i % 2 == 0) {
      cout << ans[i] << ' ';
    } else {
      cout << ans[i] << '\n';
    }
  }
}