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[] = {0, 0, -1, 1};
int dy[] = {-1, 1, 0, 0};
int n;
vector<int> D[100010];
vector<int> X[100010];
bool fr[100010];
vector<pair<int, int> > R;
int main() {
  scanf("%d", &n);
  for (int i = (2); i < (n + 1); ++i) {
    int first = i;
    for (int d = 2; d * d <= first; ++d) {
      if (first % d == 0) {
        D[i].push_back(d);
        X[d].push_back(i);
        while (first % d == 0) first /= d;
      }
    }
    if (first > 1) {
      D[i].push_back(first);
      X[first].push_back(i);
    }
    fr[i] = 1;
  }
  for (int d = (n); d > (1); --d) {
    for (int i = (0); i < ((int)X[d].size()); ++i)
      if (X[d][i] % 2 == 0 && fr[X[d][i]]) swap(X[d][i], X[d].back());
    int last = -1;
    for (int i = (0); i < ((int)X[d].size()); ++i) {
      if (!fr[X[d][i]]) continue;
      if (last == -1)
        last = X[d][i];
      else {
        fr[last] = 0;
        fr[X[d][i]] = 0;
        R.push_back(pair<int, int>(last, X[d][i]));
        last = -1;
      }
    }
  }
  printf("%d\n", (int)R.size());
  for (pair<int, int> p : R) printf("%d %d\n", p.first, p.second);
  return 0;
}