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 MAX_N = (1 << 18);
int n;
int era[MAX_N];
int prime[MAX_N], pos;
int used[MAX_N];
int ans[MAX_N][2], apos;
void sieve() {
  long long i, j;
  for (i = 2; i <= 1e5; i++) {
    if (!era[i]) prime[pos++] = i;
    for (j = i * i; j <= 1e5; j += i) era[j] = 1;
  }
}
void do_it(int i) {
  int j, cnt = 0;
  for (j = 1; j * prime[i] <= n; j++) {
    if (used[j * prime[i]]) continue;
    cnt++;
  }
  if (cnt % 2) {
    ans[apos][0] = prime[i];
    used[prime[i]] = 1;
    j = 3;
  } else
    j = 1;
  for (; j * prime[i] <= n; j++) {
    if (used[j * prime[i]]) continue;
    if (ans[apos][0]) {
      ans[apos][1] = j * prime[i];
      used[j * prime[i]] = 1;
      apos++;
    } else {
      ans[apos][0] = j * prime[i];
      used[j * prime[i]] = 1;
    }
  }
}
int main() {
  int i;
  sieve();
  scanf("%d", &n);
  for (i = 1; prime[i] <= (n >> 1); i++) do_it(i);
  do_it(0);
  printf("%d\n", apos);
  for (i = 0; i < apos; i++) printf("%d %d\n", ans[i][0], ans[i][1]);
  return 0;
}