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 w5[10][2] = {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 5},
                 {3, 5}, {1, 5}, {3, 4}, {2, 4}, {4, 5}};
int w4[6][2] = {{1, 2}, {3, 4}, {1, 3}, {2, 4}, {1, 4}, {2, 3}};
int w8[16][2] = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {1, 2}, {2, 1},
                 {3, 4}, {4, 3}, {1, 3}, {3, 1}, {2, 4}, {4, 2},
                 {1, 4}, {4, 1}, {2, 3}, {3, 2}};
int w[1100];
int G[1100][1100];
void Put(int a, int b) {
  if (a > b) swap(a, b);
  printf("%d %d\n", a, b);
  G[a][b]++;
  swap(w[a], w[b]);
}
void Print4(int b) {
  int i;
  for (i = 0; i < 6; i++) Put(b + w4[i][0], b + w4[i][1]);
}
void Print8(int a, int b) {
  int i;
  for (i = 0; i < 16; i++) Put(a + w8[i][0], b + w8[i][1]);
}
void Print5(int a, int b) {
  int i, s, t;
  for (i = 0; i < 10; i++) {
    s = w5[i][0] + a, t = w5[i][1];
    if (t == 5)
      t = b;
    else
      t += a;
    Put(s, t);
  }
}
void Print(int n) {
  int i, j;
  for (i = 1; i <= n; i++) printf("%d ", w[i]);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (i < j && G[i][j] != 1) printf("!!!\n");
      if (i >= j && G[i][j] != 0) printf("!!!\n");
    }
  }
}
void Do(int n) {
  if (n == 1) return;
  if (n == 4) {
    Print4(0);
    return;
  }
  if (n == 5) {
    Print5(0, 5);
    return;
  }
  int i;
  for (i = 0; i < n - 5; i += 4) {
    Print8(i, n - 4);
  }
  if (n % 4 == 0)
    Print4(n - 4);
  else
    Print5(n - 5, n);
  Do(n - 4);
}
int main() {
  int n;
  scanf("%d", &n);
  if (n % 4 > 1) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  int i;
  for (i = 1; i <= n; i++) w[i] = i;
  Do(n);
}