Problem: Seyyed and MoJaK are friends of Sajjad. Sajjad likes a permutation. Seyyed wants to change the permutation in a way that Sajjad won't like it. Seyyed thinks more swaps yield more probability to do that, so he makes MoJaK to perform a swap between every pair of positions (i, j), where i < j, exactly once. MoJaK doesn't like to upset Sajjad.

Given the permutation, determine whether it is possible to swap all pairs of positions so that the permutation stays the same. If it is possible find how to do that. 

Input

The first line contains single integer n (1 ≤ n ≤ 1000) — the size of the permutation.

As the permutation is not important, you can consider ai = i, where the permutation is a1, a2, ..., an.

Output

If it is not possible to swap all pairs of positions so that the permutation stays the same, print "NO",

Otherwise print "YES", then print <image> lines: the i-th of these lines should contain two integers a and b (a < b) — the positions where the i-th swap is performed.

Examples

Input

3


Output

NO


Input

1


Output

YES

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int a[11000002], b[11000002];
int main() {
  int n;
  scanf("%d", &n);
  int k = (n / 2);
  k *= 2;
  if (k % 4 == 2) {
    cout << "NO" << endl;
    return 0;
  }
  printf("YES\n");
  if (n == 1) return 0;
  int sk = 10002;
  a[10002] = 10003;
  b[10003] = 10002;
  a[10003] = 20004;
  b[20004] = 10003;
  a[20004] = 10004;
  b[10004] = 20004;
  a[10004] = 20003;
  b[20003] = 10004;
  a[20003] = 30004;
  b[30004] = 20003;
  int zzz = 6;
  int v = 30004;
  for (int i = 5; i <= k; i += 4) {
    for (int j = 1; j < i; j += 2) {
      int x = 10000 * j + j + 1;
      int z = a[x];
      int a1 = i;
      int a2 = i + 1;
      int a3 = i + 2;
      int a4 = i + 3;
      int x1 = j * 10000 + a1;
      int x2 = (j + 1) * 10000 + a2;
      int x3 = (j + 1) * 10000 + a1;
      int x4 = j * 10000 + a2;
      a[x] = x1;
      a[x1] = x2;
      a[x2] = x3;
      a[x3] = x4;
      a[x4] = z;
      b[z] = x4;
      b[x4] = x3;
      b[x3] = x2;
      b[x2] = x1;
      b[x1] = x;
      if (v == x) v = x4;
      x1 = j * 10000 + a3;
      x2 = (j + 1) * 10000 + a4;
      x3 = (j + 1) * 10000 + a3;
      x4 = j * 10000 + a4;
      z = a[x];
      a[x] = x1;
      a[x1] = x2;
      a[x2] = x3;
      a[x3] = x4;
      a[x4] = z;
      b[z] = x4;
      b[x4] = x3;
      b[x3] = x2;
      b[x2] = x1;
      b[x1] = x;
      if (v == x) v = x4;
      zzz += 8;
    }
    int a1 = i;
    int a2 = i + 1;
    int a3 = i + 2;
    int a4 = i + 3;
    a[v] = a1 * 10000 + a2;
    a[a1 * 10000 + a2] = a1 * 10000 + a3;
    b[a1 * 10000 + a3] = a1 * 10000 + a2;
    a[a1 * 10000 + a3] = a2 * 10000 + a4;
    b[a2 * 10000 + a4] = a1 * 10000 + a3;
    a[a2 * 10000 + a4] = a1 * 10000 + a4;
    b[a1 * 10000 + a4] = a2 * 10000 + a4;
    a[a1 * 10000 + a4] = a2 * 10000 + a3;
    b[a2 * 10000 + a3] = a1 * 10000 + a4;
    a[a2 * 10000 + a3] = a3 * 10000 + a4;
    b[a3 * 10000 + a4] = a2 * 10000 + a3;
    v = a3 * 10000 + a4;
    zzz += 6;
  }
  int zzzz = 0;
  int nax = 0;
  for (int i = sk; i != 0; i = a[i]) {
    b[i] = nax;
    nax = i;
  }
  if (k != n) {
    for (int i = 1; i < n; i += 2) {
      int x = i * 10000 + i + 1;
      int y = b[x];
      int z = a[x];
      int p = i * 10000 + n;
      int r = (i + 1) * 10000 + n;
      a[y] = p;
      a[p] = x;
      a[x] = r;
      if (x != v) a[r] = z;
      b[z] = r;
      b[r] = x;
      b[x] = p;
      if (x != sk) b[p] = y;
      if (sk == x) sk = p;
      if (v == x) v = r;
      zzz++;
      zzz++;
    }
  }
  int zz = 0;
  for (int i = sk; i != 0; i = a[i]) {
    printf("%d %d\n", i / 10000, i % 10000);
    zz++;
  }
  return 0;
}