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;
const int Nmax = 1e5 + 10;
bool a[Nmax] = {0};
vector<pair<int, int> > g;
int main(void) {
  int n, i, z;
  scanf("%d", &n);
  for (i = 3; i <= n / 2; i++) {
    for (z = 3; z * z <= i; z++)
      if (i % z == 0) break;
    if (z * z > i) {
      vector<int> s;
      for (z = i; z <= n; z += i)
        if (a[z] == 0) s.push_back(z);
      if (s.size() & 1 && s.size() >= 3) {
        swap(s[s.size() - 1], s[1]);
        s.pop_back();
      }
      if (s.size() > 1)
        for (z = 0; z + 2 <= s.size(); z += 2) {
          g.push_back(make_pair(s[z], s[z + 1]));
          a[s[z]] = 1;
          a[s[z + 1]] = 1;
        }
    }
  }
  vector<int> s;
  for (i = 2; i <= n; i += 2)
    if (a[i] == 0) s.push_back(i);
  for (i = 0; i + 2 <= s.size(); i += 2) g.push_back(make_pair(s[i], s[i + 1]));
  printf("%d\n", g.size());
  for (i = 0; i < g.size(); i++) printf("%d %d\n", g[i].first, g[i].second);
}