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;
queue<int> pr;
vector<pair<int, int> > ans;
int so = -1;
int p[100001];
int i, j, n, ok;
int gcd(int a, int b) {
  while (a %= b ^= a ^= b ^= a)
    ;
  return a + b;
}
int main() {
  for (i = 2; i * i < 100000; i++)
    if (!p[i])
      for (j = i * i; j <= 100000; j += i) p[j] = 1;
  scanf("%d", &n);
  for (i = 2; i <= n; i++) {
    if (!p[i])
      pr.push(i);
    else if (i == 2 * pr.front()) {
      pr.pop();
      ans.push_back(make_pair(i / 2, i));
    } else if (so == -1)
      so = i;
    else if (gcd(so, i) != 1) {
      ans.push_back(make_pair(so, i));
      so = -1;
    } else {
      ok = 0;
      for (j = 0; j < ans.size(); j++)
        if (gcd(ans[j].first, so) != 1 && gcd(ans[j].second, i) != 1) {
          swap(ans[j].second, so);
          ans.push_back(make_pair(so, i));
          so = -1;
          ok = 1;
          break;
        } else if (gcd(ans[j].first, i) != 1 && gcd(ans[j].second, so) != 1) {
          ans.push_back(make_pair(so, ans[j].second));
          ans[j].second = i;
          so = -1;
          ok = 1;
          break;
        }
      if (!ok) throw 0;
    }
  }
  printf("%d\n", ans.size());
  for (i = 0; i < ans.size(); i++)
    printf("%d %d\n", ans[i].first, ans[i].second);
  return 0;
}