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;
bool q[100005], f[100005];
int p[100005], t, n, k, a[100005];
int s[100005][2], res;
inline int read() {
  char ch = getchar();
  int X = 0;
  bool fl = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') fl = 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    X = (X << 1) + (X << 3) + ch - '0';
    ch = getchar();
  }
  if (fl) return ~(X - 1);
  return X;
}
inline void write(int x) {
  if (x < 0)
    putchar('-'), write(-x);
  else {
    if (x > 9) write(x / 10);
    putchar('0' + x % 10);
  }
}
void GetPrime(int n) {
  memset(q, 1, sizeof(q));
  q[1] = 0;
  for (int i = 2; i <= n; i++) {
    if (q[i]) p[++t] = i;
    for (int j = 1; j <= t && i * p[j] <= n; j++) {
      q[i * p[j]] = 0;
      if (!(i % p[j])) break;
    }
  }
}
int main() {
  n = read();
  GetPrime(n);
  for (int i = t; i; i--) {
    int ps = 0;
    for (int j = p[i]; j <= n; j += p[i])
      if (!f[j]) a[++ps] = j;
    if (ps & 1) swap(a[2], a[ps]), --ps;
    for (int j = 1; j <= ps; j += 2) {
      f[a[j]] = f[a[j + 1]] = 1;
      s[++res][0] = a[j], s[res][1] = a[j + 1];
    }
  }
  write(res), putchar('\n');
  for (int i = 1; i <= res; i++)
    write(s[i][0]), putchar(' '), write(s[i][1]), putchar('\n');
  return 0;
}