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 dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main() {
  int n;
  vector<int> g = ({
    int b = ceil(sqrt(51005));
    vector<int> d(51005, 0);
    vector<int> e;
    int f = 2;
    e.push_back(2);
    e.push_back(3);
    for (int x = 1; x < b + 1; x++) {
      for (int y = 1; y < b + 1; y++) {
        int n = (4 * x * x) + (y * y);
        if (n <= 51005 && (n % 12 == 1 || n % 12 == 5)) {
          d[n] ^= 1;
        }
        n = (3 * x * x) + (y * y);
        if (n <= 51005 && n % 12 == 7) {
          d[n] ^= 1;
        }
        n = (3 * x * x) - (y * y);
        if (x > y && n <= 51005 && n % 12 == 11) {
          d[n] ^= 1;
        }
      }
    }
    for (int r = 5; r < b + 1; r++) {
      if (d[r]) {
        for (int i = r * r; i < 51005; i += (r * r)) {
          d[i] = 0;
        }
      }
    }
    for (int c = 5; c < 51005; c++) {
      if (d[c]) {
        e.push_back(c);
      }
    }
    e;
  });
  cin >> n;
  int a[n + 1];
  for (int i = 0; i <= n; i++) a[i] = 0;
  vector<int> v, x;
  vector<pair<int, int> > ans;
  int i = 0;
  while (g[i] <= n / 2) {
    v.push_back(g[i]);
    i++;
  }
  reverse(v.begin(), v.end());
  int len = v.size(), l, val;
  for (i = 0; i < len; i++) {
    x.clear();
    val = 1;
    while (val * v[i] <= n) {
      if (a[val * v[i]] == 0) x.push_back(val * v[i]);
      val++;
    }
    l = x.size();
    if (l % 2 == 1) {
      for (int j = 0; j < l; j++) {
        if (x[j] == 2 * v[i]) {
          x.erase(x.begin() + j);
          l--;
          break;
        }
      }
    }
    for (int j = 0; j < l; j += 2) {
      ans.push_back(make_pair(x[j], x[j + 1]));
      a[x[j]] = 1;
      a[x[j + 1]] = 1;
    }
  }
  cout << ans.size() << endl;
  for (i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}