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;
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
inline long long read() {
  register long long x = 0, f = 1;
  register char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  return x * f;
}
void write(long long x) {
  if (x < 0) x = -x, putchar('-');
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
void writeln(long long x) {
  write(x);
  puts("");
}
const int mod = 998244353;
void print(int x, int y) { printf("%d %d\n", x, y); }
int main() {
  int n = read();
  if (n % 4 == 0 || n % 4 == 1) {
    puts("YES");
  } else {
    puts("NO");
    return 0;
  }
  for (int i = 1; i < n; i += 4) {
    if (n % 4 == 1) {
      print(i, n), print(i, i + 1), print(i + 1, n);
      print(i + 2, n), print(i + 2, i + 3), print(i + 3, n);
    } else
      print(i, i + 1), print(i + 2, i + 3);
    print(i, i + 2), print(i + 1, i + 3);
    print(i, i + 3);
    print(i + 1, i + 2);
  }
  for (int i = 1; i < n; i += 4) {
    for (int j = i + 4; j < n; j += 4) {
      print(i, j), print(i + 1, j + 1), print(i + 2, j + 2),
          print(i + 3, j + 3);
      print(i, j + 1), print(i + 1, j), print(i + 2, j + 3),
          print(i + 3, j + 2);
      print(i, j + 2), print(i + 2, j), print(i + 1, j + 3),
          print(i + 3, j + 1);
      print(i, j + 3), print(i + 3, j), print(i + 1, j + 2),
          print(i + 2, j + 1);
    }
  }
  return 0;
}