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 = 100005;
int n;
int prime[MAXN], pn, now[MAXN], N;
int ans[MAXN][2], anstot;
bool vis[MAXN], pd[MAXN];
int Read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x * 10) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
void Put1(int x) {
  if (x > 9) Put1(x / 10);
  putchar(x % 10 ^ 48);
}
void Put(int x, char c = -1) {
  if (x < 0) putchar('-'), x = -x;
  Put1(x);
  if (c >= 0) putchar(c);
}
template <typename T>
T Max(T x, T y) {
  return x > y ? x : y;
}
template <typename T>
T Min(T x, T y) {
  return x < y ? x : y;
}
template <typename T>
T Abs(T x) {
  return x < 0 ? -x : x;
}
void sieve(int x) {
  for (int i = 2; i <= x; ++i) {
    if (!vis[i]) prime[++pn] = i;
    for (int j = 1; j <= pn && i * prime[j] <= x; ++j) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int main() {
  n = Read();
  sieve(n);
  for (int i = n; i >= 2; --i) {
    if (!vis[i]) {
      N = 0;
      for (int j = i; j <= n; j += i)
        if (!pd[j]) now[++N] = j;
      if (N & 1) {
        if (N > 1) {
          ans[++anstot][0] = now[1];
          pd[now[1]] = 1;
          ans[anstot][1] = now[3];
          pd[now[3]] = 1;
          for (int j = 4; j <= N; j += 2) {
            ans[++anstot][0] = now[j];
            pd[now[j]] = 1;
            ans[anstot][1] = now[j + 1];
            pd[now[j + 1]] = 1;
          }
        }
      } else {
        for (int j = 1; j <= N; j += 2) {
          ans[++anstot][0] = now[j];
          pd[now[j]] = 1;
          ans[anstot][1] = now[j + 1];
          pd[now[j + 1]] = 1;
        }
      }
    }
  }
  Put(anstot, '\n');
  for (int i = 1; i <= anstot; ++i) Put(ans[i][0], ' '), Put(ans[i][1], '\n');
  return 0;
}