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 int inf = 2000000000;
static inline int Rint() {
  struct X {
    int dig[256];
    X() {
      for (int i = '0'; i <= '9'; ++i) dig[i] = 1;
      dig['-'] = 1;
    }
  };
  static X fuck;
  int s = 1, v = 0, c;
  for (; !fuck.dig[c = getchar()];)
    ;
  if (c == '-')
    s = 0;
  else if (fuck.dig[c])
    v = c ^ 48;
  for (; fuck.dig[c = getchar()]; v = v * 10 + (c ^ 48))
    ;
  return s ? v : -v;
}
template <typename T>
static inline void cmax(T& a, const T& b) {
  if (b > a) a = b;
}
template <typename T>
static inline void cmin(T& a, const T& b) {
  if (b < a) a = b;
}
const int maxn = 100005;
int mask[maxn];
int used[maxn];
int is_prime[maxn];
int cmp(int x, int y) { return mask[x] > mask[y]; }
int main() {
  const int n = Rint();
  fill(is_prime, is_prime + n + 1, 1);
  for (int i = 2; i <= n; ++i)
    if (is_prime[i] == 1) {
      for (int j = i + i; j <= n; j += i) is_prime[j] = 0, ++mask[j];
      mask[i] = 1;
    }
  vector<int> ans;
  for (int i = n; i >= 2; --i)
    if (is_prime[i] == 1) {
      vector<int> adj;
      for (int j = i; j <= n; j += i)
        if (used[j] == 0) {
          adj.push_back(j);
        }
      const int size = ((int)(adj).size());
      if (size % 2 == 0) {
        for (int j = 0; j < size; j += 2) {
          ans.push_back(adj[j]), ans.push_back(adj[j + 1]);
          used[adj[j]] = 1;
          used[adj[j + 1]] = 1;
        }
      } else {
        sort((adj).begin(), (adj).end(), cmp);
        for (int j = 1; j < size; j += 2) {
          ans.push_back(adj[j]), ans.push_back(adj[j + 1]);
          used[adj[j]] = 1;
          used[adj[j + 1]] = 1;
        }
      }
    }
  printf("%d\n", ans.size() / 2);
  for (int i = 0; i < ans.size(); i += 2) printf("%d %d\n", ans[i], ans[i + 1]);
  return 0;
}