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 main() {
  int num[100005];
  int isprime[100005];
  int prime[100005];
  int ans[100005][2];
  int anscnt = 0;
  int n;
  int cnt = 0;
  scanf("%d", &n);
  for (int i = 2; i <= n / 2; i++) {
    if (isprime[i] == 0) {
      for (int j = i + i; j <= n; j += i) isprime[j] = 1;
      prime[cnt++] = i;
    }
  }
  for (int i = cnt - 1; i >= 0; i--) {
    int tmp = 0;
    for (int j = prime[i]; j <= n; j += prime[i]) {
      if (num[j] == 0) tmp++;
    }
    if (tmp > 1) {
      int j = prime[i];
      int tt = 0;
      while (j <= n) {
        int k = j + prime[i];
        if (tmp % 2 == 1 && tt == 0) k += prime[i];
        tt++;
        while (k <= n && num[k] != 0) k += prime[i];
        if (k > n)
          j = n + 1;
        else {
          num[j] = 1;
          num[k] = 1;
          ans[anscnt][0] = j;
          ans[anscnt++][1] = k;
          j = k + prime[i];
          while (j <= n && num[j] != 0) j += prime[i];
        }
      }
    }
  }
  printf("%d\n", anscnt);
  for (int i = 0; i < anscnt; i++) {
    printf("%d %d\n", ans[i][0], ans[i][1]);
  }
  return 0;
}