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 mod = 1e9 + 7;
const int N = 1e6 + 10;
const long long INF = 1e18;
const long double EPS = 1e-12;
int mk[200005];
int net[200005];
vector<vector<int> > vec;
int main() {
  int n;
  cin >> n;
  vec.resize(n + 5);
  for (int i = 0; i < (int)n + 1; i++) {
    mk[i] = 1;
    net[i] = 1;
  }
  for (int i = (int)2; i < (int)n + 1; i++) {
    if (mk[i] == 1) {
      for (int j = 2; j * i <= n; j++) {
        mk[i * j] = 0;
      }
    }
  }
  int ans = 0;
  for (int i = (int)3; i < (int)n + 1; i++) {
    if (mk[i] == 1) {
      int tmp = 0;
      for (int j = 1; j * i <= n; j++) {
        if (net[i * j] == 0) continue;
        if (j != 2) {
          vec[i].push_back(i * j);
        }
        tmp++;
        net[i * j] = 0;
      }
      if (tmp % 2 == 1) {
        net[2 * i] = 1;
        tmp--;
      } else {
        vec[i].push_back(i * 2);
      }
      ans += tmp / 2;
    }
  }
  int tmp = 0;
  for (int i = (int)2; i < (int)n + 1; i++) {
    if (i % 2 == 0 && net[i] == 1) {
      tmp++;
      vec[2].push_back(i);
    }
  }
  ans += tmp / 2;
  cout << ans << endl;
  for (int i = 0; i < (int)n + 1; i++) {
    if ((int)(vec[i].size()) < 2) continue;
    for (int j = 0; j < (int)vec[i].size() - 1; j++) {
      cout << vec[i][j] << " " << vec[i][j + 1] << endl;
      j++;
    }
  }
  return 0;
}