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>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")
using namespace std;
bool isvowel(char c) {
  c = tolower(c);
  if (c == 'a' || c == 'e' || c == 'i' || c == 'y' || c == 'o' || c == 'u')
    return 1;
  return 0;
}
const double eps = 0.000001;
const long double pi = acos(-1);
const int maxn = 1e7 + 9;
const int mod = 1e9 + 7;
const long long MOD = 1e18 + 9;
const long long INF = 1e18 + 123;
const int inf = 2e9 + 11;
const int mxn = 1e6 + 9;
const int N = 3e5 + 123;
const int PRI = 555557;
const int pri = 997;
const int Magic = 2101;
int n, m, k;
int a[N];
bool u[N];
vector<int> g[N];
vector<pair<int, int> > ans;
void dfs(int x) {
  u[x] = 1;
  vector<int> cur;
  for (int to : g[x]) {
    if (!u[to]) {
      dfs(to);
      if (a[to] == 0) cur.push_back(to);
    } else if (a[to] == 0)
      cur.push_back(to);
  }
  if (cur.size() % 2 == 0) {
    for (int i = 0; i < cur.size(); i += 2) {
      ans.push_back(make_pair(cur[i], cur[i + 1]));
      a[cur[i]] = 1;
      a[cur[i + 1]] = 1;
    }
    a[x] = 0;
  } else {
    for (int i = 1; i < cur.size(); i += 2) {
      ans.push_back(make_pair(cur[i], cur[i + 1]));
      a[cur[i]] = 1;
      a[cur[i + 1]] = 1;
    }
    a[cur[0]] = 1;
    a[x] = 1;
    ans.push_back(make_pair(x, cur[0]));
  }
}
inline void Solve() {
  cin >> n;
  for (int i = 2; i <= n; i++) {
    a[i] = -1;
    for (int j = i + i; j <= n; j += i) {
      g[i].emplace_back(j);
      g[j].emplace_back(i);
    }
  }
  if (n > 1) dfs(2);
  cout << ans.size() << '\n';
  for (auto x : ans) cout << x.first << ' ' << x.second << '\n';
}
int main() {
  int tests = 1;
  ios_base::sync_with_stdio(0), cin.tie(0);
  while (tests--) {
    Solve();
  }
  return 0;
}