public void solve() {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    Prime p = new Prime(n);
    List<int[]> list = new ArrayList<int[]>();
    for (int i = 3; i + 2 <= n; i += 2) {
      if (p.isPrime(i) && p.isPrime(i + 2)) {
        list.add(new int[]{2, i});
      }
    }
    System.out.println(list.size());
    for (int[] ints : list) {
      System.out.println(ints[0] + " " + ints[1]);
    }
  }