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;
vector<int> p;
bool is[100005] = {false};
void prime(int n) {
  p.clear();
  for (int i = 2; i <= n; i++) {
    if (!is[i]) {
      p.push_back(i);
      for (int j = i + i; j <= n; j += i) {
        is[j] = true;
      }
    }
  }
}
int visit[100005];
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1) {
    printf("0\n");
    return 0;
  }
  vector<vector<int> > num;
  num.resize(n / 2 + 2);
  prime(n);
  for (int i = p.size() - 1; i >= 0; i--) {
    if (p[i] <= n / 2) {
      for (int j = 1; j * p[i] <= n; j++) {
        if (visit[p[i] * j] == 0) {
          num[p[i]].push_back(p[i] * j);
          visit[p[i] * j] = 1;
        }
      }
    }
  }
  int sum = 0;
  for (int i = num.size() - 1; i >= 3; i--) {
    if (num[i].size() != 0 && num[i].size() % 2 == 1) {
      num[i].erase(num[i].begin() + 1);
      num[2].push_back(i * 2);
    }
    sum += num[i].size();
  }
  if (num[2].size() != 0 && num[2].size() % 2 == 1) {
    num[2].erase(num[2].begin());
  }
  sum += num[2].size();
  printf("%d\n", sum / 2);
  for (int i = num.size() - 1; i >= 2; i--) {
    if (num[i].size() != 0) {
      for (int j = 0; j < num[i].size(); j += 2) {
        printf("%d %d\n", num[i][j], num[i][j + 1]);
      }
    }
  }
  return 0;
}