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;
int k;
int a[100001], b[100001];
int c[100001];
bool p[100001];
int n;
int main() {
  cin >> n;
  k = 0;
  int i, j, cnt, extra = 0;
  for (i = 3; i <= n; i += 2)
    if (!p[i]) {
      cnt = 0;
      for (j = i; j <= n; j += i)
        if (!p[j]) {
          cnt++;
        }
      if (cnt % 2 == 0) {
        cnt = 0;
        for (j = i; j <= n; j += i)
          if (!p[j]) {
            p[j] = 1;
            if (cnt == 0) {
              a[k] = j;
              cnt = 1;
            } else {
              b[k++] = j;
              cnt = 0;
            }
          }
      } else if (cnt > 1) {
        cnt = 0;
        bool fg = 0;
        for (j = i; j <= n; j += i)
          if (!p[j]) {
            p[j] = 1;
            if (j % 2 == 1 || fg == 1) {
              if (cnt == 0) {
                a[k] = j;
                cnt = 1;
              } else {
                b[k++] = j;
                cnt = 0;
              }
            } else {
              c[extra++] = j;
              fg = 1;
            }
          }
      }
    }
  for (i = 2; i <= n; i += 2)
    if (!p[i]) {
      c[extra++] = i;
    }
  cnt = 0;
  for (i = 0; i < extra - extra % 2; i += 2) {
    a[k] = c[i];
    b[k++] = c[i + 1];
  }
  cout << k << endl;
  for (i = 0; i < k; i++) cout << a[i] << " " << b[i] << endl;
  return 0;
}