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 double eps = 1E-9;
const double Exp = 2.718281828459045;
const double Pi = 3.1415926535897932;
const int Max_Bit = 63;
const int INF = 2000000000;
const long long LINF = 1000000000000000007ll;
const int MOD = 1000000007;
const int NMAX = 100005;
const int MMAX = 305;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n, u[NMAX], pr[NMAX], mm = 0;
  vector<pair<int, int> > ans;
  queue<int> st;
  for (int i = 0; i < NMAX; ++i) {
    u[i] = 0;
    pr[i] = 0;
  }
  scanf("%d", &n);
  for (int i = 2; i <= n / 2; ++i) {
    if (!pr[i]) {
      mm = i;
      long long j = i * 1ll * i;
      while (j <= n / 2) {
        pr[j] = 1;
        j += i;
      }
    }
  }
  for (int i = mm; i > 1; --i) {
    if (!pr[i]) {
      int m = 0;
      for (int j = 1; j <= n / i; j++) {
        if (!u[i * j]) {
          st.push(i * j);
        }
      }
      if (st.size() % 2) {
        int a = st.front();
        u[a] = 1;
        st.pop();
        st.pop();
        ans.push_back(make_pair(a, st.front()));
        u[st.front()] = 1;
        st.pop();
        while (!st.empty()) {
          int a = st.front();
          u[a] = 1;
          st.pop();
          ans.push_back(make_pair(a, st.front()));
          u[st.front()] = 1;
          st.pop();
        }
      } else {
        while (!st.empty()) {
          int a = st.front();
          u[a] = 1;
          st.pop();
          ans.push_back(make_pair(a, st.front()));
          u[st.front()] = 1;
          st.pop();
        }
      }
    }
  }
  printf("%d\n", ans.size());
  int o = ans.size();
  for (int i = 0; i < o; ++i) {
    printf("%d %d\n", ans[i].first, ans[i].second);
  }
  return 0;
}