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;
template <class T>
inline T& RD(T& x) {
  char c;
  for (c = getchar(); c < '0'; c = getchar())
    ;
  x = c - '0';
  for (c = getchar(); '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  return x;
}
int p[100005];
vector<int> v[100005];
vector<pair<int, int> > ans;
bool er[100005];
int main() {
  int n;
  scanf("%d", &n);
  if (n <= 2) {
    printf("0\n");
    return 0;
  }
  memset(p, 0, sizeof(p));
  int cnt = 0;
  for (int i = 2; i <= n; i++) {
    if (p[i] == 0) {
      for (int j = 1; i * j <= n; j++) {
        if (p[i * j] == 0) {
          p[i * j] = 1;
          v[cnt].push_back(i * j);
        }
      }
      cnt++;
    }
  }
  int res = 0;
  memset(er, false, sizeof(er));
  for (int i = cnt - 1; i >= 1; i--) {
    int j;
    for (j = v[i].size() - 1; j > 0; j -= 2) {
      ans.push_back(make_pair(v[i][j], v[i][j - 1]));
    }
    if (j == 0) {
      if (2 * v[i][0] <= n) {
        ans.push_back(make_pair(v[i][0], 2 * v[i][0]));
        er[v[i][0] * 2] = true;
      }
    }
  }
  int t = 0;
  for (int i = 0; i < v[0].size(); i++) {
    if (er[v[0][i]] == false) {
      if (t == 0) {
        t = v[0][i];
      } else {
        ans.push_back(make_pair(t, v[0][i]));
        t = 0;
      }
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    pair<int, int> p = ans[i];
    printf("%d %d\n", p.first, p.second);
  }
}