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;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
int cnt;
void pp(int x, int y) { printf("%d %d\n", x, y); }
void p4(int i) {
  pp(i + 2, i + 3);
  pp(i, i + 2);
  pp(i + 1, i + 3);
  pp(i + 1, i + 2);
  pp(i, i + 3);
  pp(i, i + 1);
}
void p5(int i, int n) {
  pp(3 + i, n);
  pp(3 + i, 4 + i);
  pp(4 + i, n);
  pp(1 + i, 3 + i);
  pp(2 + i, 4 + i);
  pp(2 + i, 3 + i);
  pp(1 + i, 4 + i);
  pp(1 + i, n);
  pp(1 + i, 2 + i);
  pp(2 + i, n);
}
void p4p4(int i, int j) {
  pp(i + 3, j + 2);
  pp(i + 2, j + 2);
  pp(i + 3, j + 1);
  pp(i, j + 1);
  pp(i + 1, j + 3);
  pp(i + 2, j + 3);
  pp(i + 1, j + 2);
  pp(i + 1, j + 1);
  pp(i + 3, j);
  pp(i + 3, j + 3);
  pp(i, j + 2);
  pp(i, j + 3);
  pp(i + 2, j);
  pp(i + 2, j + 1);
  pp(i + 1, j);
  pp(i, j);
}
void fmain(int tid) {
  scanf("%d", &n);
  if (n % 4 == 0) {
    puts("YES");
    k = n / 4;
    for (int i = 1; i <= n; i += 4) p4(i);
    for (int(i) = 0; (i) < (int)(k); (i)++)
      for (int j = i + 1; j < k; j++) p4p4(i * 4 + 1, j * 4 + 1);
  } else if (n % 4 == 1) {
    puts("YES");
    k = n / 4;
    for (int i = 1; i < n; i += 4) p5(i - 1, n);
    for (int(i) = 0; (i) < (int)(k); (i)++)
      for (int j = i + 1; j < k; j++) p4p4(i * 4 + 1, j * 4 + 1);
  } else
    etp();
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}