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 = 200010;
int vis[maxn], a[maxn], b[maxn], tot;
int p[maxn], cnt, N, q[maxn], num;
void getprime() {
  for (int i = 2; i <= N; i++) {
    if (!vis[i]) p[++cnt] = i;
    for (int j = 1; j <= cnt && i * p[j] <= N; j++) {
      vis[i * p[j]] = 1;
      if (!(i % p[j])) break;
    }
  }
}
int main() {
  scanf("%d", &N);
  if (N == 1 || N == 2) return puts("0"), 0;
  getprime();
  for (int i = 1; i <= N; i++) vis[i] = 0;
  vis[1] = 1;
  for (int i = 2; i <= cnt; i++) {
    num = 0;
    int pos = 1;
    for (int j = p[i]; j <= N; j += p[i])
      if (!vis[j]) q[++num] = j;
    if (num & 1) swap(q[1], q[2]), pos = 2;
    for (int j = pos; j <= num; j++) {
      tot++;
      a[tot] = q[j];
      b[tot] = q[++j];
      vis[a[tot]] = vis[b[tot]] = 1;
    }
  }
  num = 0;
  int pos = 1;
  for (int j = p[1]; j <= N; j += p[1])
    if (!vis[j]) q[++num] = j;
  if (num & 1) swap(q[1], q[2]), pos = 2;
  for (int j = pos; j <= num; j++) {
    tot++;
    a[tot] = q[j];
    b[tot] = q[++j];
    vis[a[tot]] = vis[b[tot]] = 1;
  }
  printf("%d\n", tot);
  for (int i = 1; i <= tot; i++) printf("%d %d\n", a[i], b[i]);
  return 0;
}