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;
typedef pair<int, int> ll;
typedef vector<int> vl;
typedef vector<ll> vll;
typedef vector<vl> vvl;
template <typename T>
ostream &operator<<(ostream &o, vector<T> v) {
  if (v.size() > 0) o << v[0];
  for (unsigned i = 1; i < v.size(); i++) o << " " << v[i];
  return o << "\n";
}
template <typename U, typename V>
ostream &operator<<(ostream &o, pair<U, V> p) {
  return o << "(" << p.first << ", " << p.second << ") ";
}
template <typename T>
istream &operator>>(istream &in, vector<T> &v) {
  for (unsigned i = 0; i < v.size(); i++) in >> v[i];
  return in;
}
template <typename T>
istream &operator>>(istream &in, pair<T, T> &p) {
  in >> p.first;
  in >> p.second;
  return in;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(20);
  int n;
  cin >> n;
  if (n < 4) {
    cout << "0";
    return 0;
  }
  vll ans;
  vl used(n + 1, 0);
  for (int it = 3; it <= n; it += 2)
    if (!used[it]) {
      vl temp;
      for (int i = it; i <= n; i += it)
        if (!used[i]) {
          used[i] = 1;
          temp.push_back((i));
        }
      int i = 0;
      if (temp.size() % 2 == 1 and temp.size() > 1) {
        ans.push_back((make_pair((temp[0]), (temp[2]))));
        used[temp[1]] = 0;
        i = 3;
      }
      for (i = i; i < temp.size() - 1; i += 2) {
        ans.push_back((make_pair((temp[i]), (temp[i + 1]))));
      }
    }
  vl temp;
  for (int i = (1); i < (int)n + 1; i++)
    if (!used[i] and i % 2 == 0) temp.push_back((i));
  for (int i = 0; i < temp.size() - 1; i += 2)
    ans.push_back((make_pair((temp[i]), (temp[i + 1]))));
  cout << ans.size() << "\n";
  for (auto it : ans) cout << it.first << " " << it.second << "\n";
  return 0;
}