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>
const int P0[6] = {5, 3, 4, 1, 6, 2};
const int P1[16] = {5, 12, 8, 3, 14, 15, 2, 9, 11, 4, 6, 7, 13, 16, 1, 10};
const int P2[10] = {10, 6, 9, 4, 7, 3, 8, 5, 1, 2};
const int P3[20] = {18, 15, 11, 10, 7,  2,  5,  9, 13, 16,
                    1,  20, 14, 8,  17, 19, 12, 6, 3,  4};
using namespace std;
int n, m;
struct poi {
  int x, y, id;
} a[1000];
void solve0() {
  for (int i = 0; i <= 5; ++i) printf("%d %d\n", a[P0[i]].x, a[P0[i]].y);
}
void solve1() {
  for (int i = 0; i <= 15; ++i) printf("%d %d\n", a[P1[i]].x, a[P1[i]].y);
}
void solve2() {
  for (int i = 0; i <= 9; ++i) printf("%d %d\n", a[P2[i]].x, a[P2[i]].y);
}
void solve3() {
  for (int i = 0; i <= 19; ++i) printf("%d %d\n", a[P3[i]].x, a[P3[i]].y);
}
int main() {
  scanf("%d", &m);
  if (m % 4 == 2 || m % 4 == 3) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  if (m % 4 == 0) {
    for (int k = 1; k <= m / 4; ++k) {
      n = 0;
      int l = (k - 1) * 4 + 1, r = l + 3;
      for (int i = l; i <= l + 2; ++i)
        for (int j = i + 1; j <= r; ++j) {
          ++n;
          a[n].x = i, a[n].y = j;
        }
      solve0();
    }
    for (int k1 = 1; k1 <= m / 4 - 1; ++k1)
      for (int k2 = k1 + 1; k2 <= m / 4; ++k2) {
        int l1 = (k1 - 1) * 4 + 1, r1 = l1 + 3, l2 = (k2 - 1) * 4 + 1,
            r2 = l2 + 3;
        n = 0;
        for (int i = l1; i <= r1; ++i)
          for (int j = l2; j <= r2; ++j) {
            ++n;
            a[n].x = i, a[n].y = j;
          }
        solve1();
      }
  } else {
    if (m == 1) return 0;
    for (int k = 1; k <= m / 4 - 1; ++k) {
      n = 0;
      int l = (k - 1) * 4 + 1, r = l + 3;
      for (int i = l; i <= l + 2; ++i)
        for (int j = i + 1; j <= r; ++j) {
          ++n;
          a[n].x = i, a[n].y = j;
        }
      solve0();
    }
    for (int k1 = 1; k1 <= m / 4 - 2; ++k1)
      for (int k2 = k1 + 1; k2 <= m / 4 - 1; ++k2) {
        int l1 = (k1 - 1) * 4 + 1, r1 = l1 + 3, l2 = (k2 - 1) * 4 + 1,
            r2 = l2 + 3;
        n = 0;
        for (int i = l1; i <= r1; ++i)
          for (int j = l2; j <= r2; ++j) {
            ++n;
            a[n].x = i, a[n].y = j;
          }
        solve1();
      }
    n = 0;
    int r = m, l = r - 4;
    for (int i = l; i <= r - 1; ++i)
      for (int j = i + 1; j <= r; ++j) {
        ++n;
        a[n].x = i, a[n].y = j;
      }
    solve2();
    for (int k = 1; k <= m / 4 - 1; ++k) {
      int l1 = (k - 1) * 4 + 1, r1 = l1 + 3, r2 = m, l2 = r2 - 4;
      n = 0;
      for (int i = l1; i <= r1; ++i)
        for (int j = l2; j <= r2; ++j) {
          ++n;
          a[n].x = i, a[n].y = j;
        }
      solve3();
    }
  }
  return 0;
}