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 = 1e5 + 7;
int N;
int p[MAX];
bool prime[MAX];
int len = 0;
int ans1[MAX], ans2[MAX];
bool vis[MAX];
void init() {
  for (int i = 2; i <= MAX - 7; ++i) {
    prime[i] = i == 2 || i % 2 ? 1 : 0;
  }
  for (int i = 2; i * i <= MAX - 7; ++i) {
    if (prime[i])
      for (int j = i + i; j <= MAX; j += i) {
        prime[j] = 0;
      }
  }
  for (int i = 2; i <= MAX - 7; ++i) {
    if (prime[i]) {
      p[len++] = i;
    }
  }
}
int main() {
  init();
  scanf("%d", &N);
  int len1 = 0;
  for (int i = 1; i < len && p[i] <= N / 2; ++i) {
    int sum = 0, t;
    for (int j = p[i]; j <= N; j += p[i]) {
      if (!vis[j]) {
        ++sum;
        t = j;
        vis[j] = 1;
        if (sum % 2)
          ans1[len1] = j;
        else
          ans2[len1++] = j;
      }
    }
    if (sum % 2) {
      ans2[len1 - sum / 2] = ans1[len1];
      vis[p[i] * 2] = 0;
    }
  }
  int sum = 0;
  for (int i = 2; i <= N; i += 2) {
    if (!vis[i]) {
      ++sum;
      if (sum % 2)
        ans1[len1] = i;
      else
        ans2[len1++] = i;
    }
  }
  printf("%d\n", len1);
  for (int i = 0; i < len1; ++i) {
    printf("%d %d\n", ans1[i], ans2[i]);
  }
  return 0;
}