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>
int N;
bool isprime[100000 + 7];
int prime[100000 + 7];
void GetPrime() {
  for (int i = 2; i <= 100000; i++) {
    if (!isprime[i]) prime[++prime[0]] = i;
    for (int j = 1; j <= prime[0] && prime[j] * i <= 100000; j++) {
      isprime[prime[j] * i] = true;
      if (i % prime[j] == 0) break;
    }
  }
}
int match[100000 + 7];
int main() {
  GetPrime();
  scanf("%d", &N);
  int ans = 0;
  for (int i = 2; prime[i] <= N / 2; i++) {
    int p = prime[i];
    int tot = 0;
    for (int j = p; j <= N; j += p)
      if (!match[j]) tot++, match[j] = p;
    if (tot & 1)
      ans += tot >> 1, match[p << 1] = 0;
    else
      ans += tot >> 1;
  }
  int tot = 0;
  for (int i = 2; i <= N; i += 2)
    if (!match[i]) match[i] = 2, tot++;
  ans += tot >> 1;
  printf("%d\n", ans);
  for (int i = 2; prime[i] <= N / 2; i++) {
    int p = prime[i];
    for (int t = 0, j = p; j <= N; j += p)
      if (match[j] == p) {
        printf("%d", j);
        t ^= 1;
        if (!t)
          puts("");
        else
          printf(" ");
      }
  }
  int las = 0;
  for (int i = 2; i <= N; i += 2)
    if (match[i] == 2) {
      if (las)
        printf("%d %d\n", las, i), las = 0;
      else
        las = i;
    }
  return 0;
}