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 MaxN = 1050;
template <class t>
inline void read(t &s) {
  s = 0;
  register int f = 1;
  register char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) s = (s << 3) + (s << 1) + (c ^ 48), c = getchar();
  s *= f;
  return;
}
template <class t, class... A>
inline void read(t &x, A &...a) {
  read(x);
  read(a...);
}
template <class t>
inline void write(t x) {
  if (x < 0) putchar('-'), x = -x;
  int buf[21], top = 0;
  while (x) buf[++top] = x % 10, x /= 10;
  if (!top) buf[++top] = 0;
  while (top) putchar(buf[top--] ^ '0');
  return;
}
inline void setIn(std::string s) {
  freopen(s.c_str(), "r", stdin);
  return;
}
inline void setOut(std::string s) {
  freopen(s.c_str(), "w", stdout);
  return;
}
inline void setIO(std::string s = "") {
  setIn(s + ".in");
  setOut(s + ".out");
  return;
}
template <class t>
inline bool checkmin(t &x, t y) {
  if (x > y) {
    x = y;
    return 1;
  }
  return 0;
}
template <class t>
inline bool checkmax(t &x, t y) {
  if (x < y) {
    x = y;
    return 1;
  }
  return 0;
}
inline int lowbit(int x) { return x & (-x); }
int n, opt;
int vis[MaxN];
inline void swap(int u, int v) { std::printf("%d %d\n", u, v); }
signed main(void) {
  read(n), opt = n & 3;
  if (opt && opt != 1) return std::puts("NO"), 0;
  std::puts("YES");
  n -= opt;
  for (int i = 0; i < n; i += 4)
    if (!opt)
      swap(i + 1, i + 2), swap(i + 3, i + 4), swap(i + 1, i + 4),
          swap(i + 2, i + 3), swap(i + 1, i + 3), swap(i + 2, i + 4);
    else
      swap(i + 1, i + 2), swap(i + 3, i + 4), swap(i + 1, i + 4),
          swap(i + 2, i + 3), swap(i + 1, n + 1), swap(i + 2, n + 1),
          swap(i + 1, i + 3), swap(i + 2, i + 4), swap(i + 4, n + 1),
          swap(i + 3, n + 1);
  for (int i = 0; i < n; i += 4)
    for (int j = i + 4; j < n; j += 4)
      swap(i + 1, j + 1), swap(i + 2, j + 2), swap(i + 1, j + 2),
          swap(i + 2, j + 1), swap(i + 1, j + 3), swap(i + 2, j + 4),
          swap(i + 1, j + 4), swap(i + 2, j + 3), swap(i + 3, j + 1),
          swap(i + 4, j + 2), swap(i + 3, j + 2), swap(i + 4, j + 1),
          swap(i + 3, j + 3), swap(i + 4, j + 4), swap(i + 3, j + 4),
          swap(i + 4, j + 3);
  return 0;
}