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 maxn = 1e5 + 10;
int n;
vector<pair<int, int> > vp;
bool isPrime[maxn];
vector<int> prime;
bool vis[maxn];
int ans;
void init() {
  ans = 0;
  vp.clear();
  memset(vis, 0, sizeof vis);
}
void getPrime() {
  memset(isPrime, 1, sizeof isPrime);
  for (long long i = 2; i < maxn; i++) {
    if (isPrime[i]) {
      prime.push_back(i);
      for (long long j = i * i; j < maxn; j += i) {
        isPrime[j] = false;
      }
    }
  }
}
void getPair(int x) {
  int k = 0, t;
  for (int i = x; i <= n; i += x) {
    if (!vis[i]) {
      vis[i] = true;
      if (k & 1) {
        vp.push_back(make_pair(t, i));
        k = 0;
      } else {
        t = i;
        k = 1;
      }
    }
  }
}
void solve() {
  int k, t;
  for (int i = 1; prime[i] <= n / 2; i++) {
    int cnt = 0;
    int pri = prime[i];
    for (int j = pri; j <= n; j += pri) {
      if (!vis[j]) {
        cnt++;
      }
    }
    if (cnt & 1 && !vis[2 * pri]) {
      k = 0;
      for (int j = pri; j <= n; j += pri) {
        if (j != 2 * pri && !vis[j]) {
          vis[j] = true;
          if (k & 1) {
            vp.push_back(make_pair(t, j));
            k = 0;
          } else {
            t = j;
            k = 1;
          }
        }
      }
    } else {
      getPair(pri);
    }
  }
  getPair(2);
}
void output() {
  printf("%d\n", vp.size());
  for (int i = 0; i < vp.size(); i++) {
    printf("%d %d\n", vp[i].first, vp[i].second);
  }
}
int main() {
  getPrime();
  while (~scanf("%d", &n)) {
    init();
    solve();
    output();
  }
  return 0;
}