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 long N = 100001;
int prime[N], pn = 0;
bool isnp[N];
void shai() {
  int i, j;
  memset(prime, 0, sizeof(prime));
  memset(isnp, 0, sizeof(isnp));
  isnp[0] = 1, isnp[1] = 1;
  pn = 0;
  for (i = 2; i < N; i++) {
    if (!isnp[i]) prime[pn++] = i;
    for (j = 0; j < pn && i * prime[j] < N; j++) {
      isnp[i * prime[j]] = 1;
      if (!(i % prime[j])) break;
    }
  }
}
int n;
vector<int> a, a2;
vector<pair<int, int> > v;
bool used[N];
int main() {
  int i, j, k;
  int l, r, mid;
  int pre;
  int ans;
  shai();
  while (scanf("%d", &n) != EOF) {
    ans = 0;
    v.clear();
    a2.clear();
    memset(used, 0, sizeof(used));
    for (i = 1; prime[i] <= n / 2; i++) {
      a.clear();
      a.push_back(prime[i]);
      for (j = 3 * prime[i]; j <= n; j += prime[i])
        if (!used[j]) a.push_back(j);
      if (a.size() % 2 == 0)
        a2.push_back(2 * prime[i]);
      else
        a.push_back(2 * prime[i]);
      int maxj = a.size();
      for (j = 0; j + 1 < maxj; j += 2) {
        v.push_back(make_pair(a[j], a[j + 1]));
        used[a[j]] = 1;
        used[a[j + 1]] = 1;
      }
    }
    if (n >= 2) a2.push_back(2);
    if (n >= 4) a2.push_back(4);
    for (i = 4; i + i <= n; i++) {
      if (!used[i + i] && isnp[i]) a2.push_back(i + i);
    }
    int maxi = a2.size();
    for (i = 0; i + 1 < maxi; i += 2) v.push_back(make_pair(a2[i], a2[i + 1]));
    printf("%d\n", v.size());
    maxi = v.size();
    for (i = 0; i < (maxi); i++) printf("%d %d\n", v[i].first, v[i].second);
  }
  return 0;
}