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 i, s, ans1[101010], ans2[101010], p[101010], a[101010], n, t, k, st[101010],
    j, x, y, v1, v2;
void add(int x, int y) {
  s++;
  ans1[s] = x;
  ans2[s] = y;
  a[x] = 1;
  a[y] = 1;
}
int main() {
  cin >> n;
  s = 0;
  t = 0;
  for (i = 2; i <= n; i++) a[i] = 0;
  k = 0;
  for (i = 2; i <= n; i++) {
    if (a[i] == 0) {
      k++;
      p[k] = i;
      x = n / i;
      for (j = 1; j <= x; j++) a[j * i] = 1;
    }
  }
  for (i = 1; i <= n; i++) a[i] = 0;
  for (i = k; i >= 2; i--) {
    x = n / p[i];
    if (x > 1) {
      v1 = p[i];
      v2 = 0;
      for (j = x; j >= 3; j--) {
        if (a[p[i] * j] == 0) {
          if (v1 == 0) {
            v1 = p[i] * j;
          } else {
            v2 = p[i] * j;
          }
          if ((v1 != 0) && (v2 != 0)) {
            add(v1, v2);
            v1 = 0;
            v2 = 0;
          }
        }
      }
      if (v1 != 0) {
        add(2 * p[i], v1);
      } else {
        t++;
        st[t] = 2 * p[i];
      }
    }
  }
  x = 2;
  while (x <= n) {
    t++;
    st[t] = x;
    x = 2 * x;
  }
  x = t / 2;
  for (i = 0; i < x; i++) add(st[2 * i + 1], st[2 * i + 2]);
  cout << s << endl;
  for (i = 1; i <= s; i++) cout << ans1[i] << " " << ans2[i] << endl;
  return 0;
}