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 n, ans;
bool pr[100003];
bool mark[100003];
vector<int> v;
vector<int> e;
vector<pair<int, int> > res;
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++)
    if (!pr[i]) {
      v.push_back(i);
      for (int j = 2 * i; j <= n; j += i) pr[j] = true;
    }
  int sz = v.size();
  for (int i = 1; i < sz && v[i] <= n / 2; i++) {
    vector<int> tmp;
    for (int j = v[i]; j <= n; j += v[i])
      if (!mark[j]) tmp.push_back(j);
    int cnt = tmp.size();
    if (cnt % 2 == 0) {
      for (int j = 0; j < cnt; j += 2) {
        res.push_back(pair<int, int>(tmp[j], tmp[j + 1]));
        mark[tmp[j]] = mark[tmp[j + 1]] = true;
      }
    } else if (cnt >= 3) {
      res.push_back(pair<int, int>(tmp[0], tmp[2]));
      mark[tmp[0]] = mark[tmp[2]] = true;
      for (int j = 3; j < cnt; j += 2) {
        res.push_back(pair<int, int>(tmp[j], tmp[j + 1]));
        mark[tmp[j]] = mark[tmp[j + 1]] = true;
      }
    }
  }
  for (int i = 2; i <= n; i += 2)
    if (!mark[i]) e.push_back(i);
  int cnt = e.size();
  for (int i = 0; i + 1 < cnt; i += 2)
    res.push_back(pair<int, int>(e[i], e[i + 1]));
  ans = res.size();
  printf("%d\n", ans);
  for (int i = 0; i < ans; i++) printf("%d %d\n", res[i].first, res[i].second);
  return 0;
}