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 flag[100005];
int p[100005];
vector<int> q;
vector<int> w;
struct node {
  int x;
  int y;
  node(int x, int y) : x(x), y(y) {}
  void pr() { cout << x << ' ' << y << endl; }
};
vector<node> ans;
int num;
int main() {
  int n;
  cin >> n;
  num = 0;
  for (int i = 2; i <= n; i++) {
    if (flag[i] == 0) p[++num] = i;
    for (int j = 1; j <= num && i * p[j] <= n; j++) {
      flag[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
  memset(flag, 0, sizeof(flag));
  for (int i = 2; i <= num; i++) {
    int x = p[i];
    w.clear();
    int cao = 0;
    for (int j = 1; j * x <= n; j++) {
      if (flag[j * x] == 0) cao++;
    }
    if (cao == 1) continue;
    if (cao % 2) {
      for (int j = 1; j * x <= n; j++) {
        if (flag[j * x] == 0) {
          if (j != 2) {
            flag[j * x] = 1;
            w.push_back(j * x);
          }
        }
      }
    } else {
      for (int j = 1; j * x <= n; j++) {
        if (flag[j * x] == 0) {
          flag[j * x] = 1;
          w.push_back(j * x);
        }
      }
    }
    for (int j = 0; j < w.size(); j += 2) {
      ans.push_back(node(w[j], w[j + 1]));
    }
  }
  q.clear();
  for (int i = 1; i <= n / 2; i++) {
    if (flag[i * 2] == 0) {
      q.push_back(i * 2);
    }
  }
  for (int i = 0; i + 1 < q.size(); i += 2) {
    ans.push_back(node(q[i], q[i + 1]));
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    ans[i].pr();
  }
  return 0;
}