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 long long LINF = 1e18;
const long long MOD = 998244353;
const int INF = 0x3f3f3f3f;
const int MAXN = 100050;
bool vis[MAXN + 50];
int pri[MAXN + 50];
int tot = 0;
void pre(int n) {
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      pri[++tot] = i;
    }
    for (int j = 1; j <= tot && i * pri[j] <= n; j++) {
      vis[i * pri[j]] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
int cnt[MAXN], vvis[MAXN];
vector<pair<int, int> > ans;
vector<int> G[MAXN];
void solve(int T) {
  int n;
  scanf("%d", &n);
  int idx;
  for (int i = 1; i <= tot; i++) {
    if (pri[i + 1] * 2 > n) {
      idx = i;
      break;
    }
  }
  for (int i = idx; i >= 1; i--) {
    for (int j = 1; j * pri[i] <= n; j++) {
      if (vvis[j * pri[i]]) continue;
      G[i].push_back(j * pri[i]);
      cnt[i]++;
    }
    if (pri[i] != 2 && cnt[i] & 1) {
      ans.push_back(make_pair(pri[i], G[i][cnt[i] - 1]));
      vvis[pri[i]] = 1;
      vvis[G[i][cnt[i] - 1]] = 1;
      for (int j = 2; j < cnt[i] - 1; j += 2) {
        ans.push_back(make_pair(G[i][j], G[i][j + 1]));
        vvis[G[i][j]] = 1;
        vvis[G[i][j + 1]] = 1;
      }
    } else {
      for (int j = 0; j < cnt[i] - 1; j += 2) {
        ans.push_back(make_pair(G[i][j], G[i][j + 1]));
        vvis[G[i][j]] = 1;
        vvis[G[i][j + 1]] = 1;
      }
    }
  }
  int sz = ans.size();
  printf("%d\n", sz);
  for (auto i : ans) {
    printf("%d %d\n", i.first, i.second);
  }
}
signed main() {
  int t = 1;
  pre(MAXN - 50);
  for (int i = 1; i <= t; i++) {
    solve(i);
  }
}