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;
int n;
int prime[100100], tot;
int use[100100];
int p[100100][2], ans;
int fl[100100], seq[100100];
void init() {
  for (int i = 2; i <= n; i++) {
    if (!use[i]) prime[++tot] = i;
    for (int j = 1; j <= tot && prime[j] * i <= n; j++) {
      use[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int main() {
  cin >> n;
  init();
  int l, r, s;
  int now = 0;
  for (int j = tot; j >= 1; j--) {
    int k = prime[j];
    now = 0;
    for (int i = 1; i * k <= n; i++) {
      if (fl[i * k] == 0) seq[++now] = i * k;
    }
    if (now & 1) {
      if (now == 1) continue;
      p[++ans][0] = seq[1], p[ans][1] = seq[3];
      fl[seq[1]] = 1, fl[seq[3]] = 1;
      for (int j = 4; j <= now; j += 2) {
        p[++ans][0] = seq[j], p[ans][1] = seq[j + 1];
        fl[seq[j]] = 1;
        fl[seq[j + 1]] = 1;
      }
    } else {
      for (int j = 1; j <= now; j += 2) {
        p[++ans][0] = seq[j], p[ans][1] = seq[j + 1];
        fl[seq[j]] = 1;
        fl[seq[j + 1]] = 1;
      }
    }
  }
  cout << ans << endl;
  for (int i = 1; i <= ans; i++) {
    cout << p[i][0] << " " << p[i][1] << endl;
  }
  return 0;
}