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;
template <class T>
inline void amin(T &x, const T &y) {
  if (y < x) x = y;
}
template <class T>
inline void amax(T &x, const T &y) {
  if (x < y) x = y;
}
template <class Iter>
void rprintf(const char *fmt, Iter begin, Iter end) {
  for (bool sp = 0; begin != end; ++begin) {
    if (sp)
      putchar(' ');
    else
      sp = true;
    printf(fmt, *begin);
  }
  putchar('\n');
}
int N;
bool P[100111];
int A[100111];
int main() {
  for (int i = 0, i_len = (100111); i < i_len; ++i) P[i] = true;
  P[0] = P[1] = false;
  for (int i = 2; i * i < 100111; i++)
    if (P[i]) {
      for (int j = i * i; j < 100111; j += i) P[j] = false;
    }
  scanf("%d", &N);
  memset(A, -1, sizeof A);
  for (int i = N / 2; i >= 2; i--)
    if (P[i]) {
      int last = -1;
      for (int j = i; j <= N; j += i) {
        if (A[j] == -1) {
          if (last == -1) {
            last = j;
          } else {
            A[j] = last;
            A[last] = j;
            last = -1;
          }
        }
      }
      if (last != -1) {
        A[i] = last;
        A[last] = i;
        A[i + i] = -1;
      }
    }
  int ans = 0;
  for (int i = 0, i_len = (N + 1); i < i_len; ++i)
    if (i < A[i]) ans++;
  printf("%d\n", ans);
  for (int i = 0, i_len = (N + 1); i < i_len; ++i)
    if (i < A[i]) {
      printf("%d %d\n", i, A[i]);
    }
  return 0;
}