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 inf = 0x3f3f3f3f, Inf = 0x7fffffff;
const long long INF = 0x7fffffffffffffff;
__inline__ __attribute__((always_inline)) unsigned int rnd() {
  static unsigned int seed = 416;
  return seed ^= seed >> 5, seed ^= seed << 17, seed ^= seed >> 13;
}
template <typename _Tp>
_Tp gcd(const _Tp &a, const _Tp &b) {
  return (!b) ? a : gcd(b, a % b);
}
template <typename _Tp>
__inline__ __attribute__((always_inline)) _Tp abs(const _Tp &a) {
  return a >= 0 ? a : -a;
}
template <typename _Tp>
__inline__ __attribute__((always_inline)) _Tp max(const _Tp &a, const _Tp &b) {
  return a < b ? b : a;
}
template <typename _Tp>
__inline__ __attribute__((always_inline)) _Tp min(const _Tp &a, const _Tp &b) {
  return a < b ? a : b;
}
template <typename _Tp>
__inline__ __attribute__((always_inline)) void chmax(_Tp &a, const _Tp &b) {
  (a < b) && (a = b);
}
template <typename _Tp>
__inline__ __attribute__((always_inline)) void chmin(_Tp &a, const _Tp &b) {
  (b < a) && (a = b);
}
template <typename _Tp>
__inline__ __attribute__((always_inline)) void read(_Tp &x) {
  char ch(getchar());
  bool f(false);
  while (ch < 48 || ch > 57) f |= ch == 45, ch = getchar();
  x = ch & 15, ch = getchar();
  while (ch >= 48 && ch <= 57)
    x = (((x << 2) + x) << 1) + (ch & 15), ch = getchar();
  if (f) x = -x;
}
template <typename _Tp, typename... Args>
__inline__ __attribute__((always_inline)) void read(_Tp &t, Args &...args) {
  read(t);
  read(args...);
}
__inline__ __attribute__((always_inline)) int read_str(char *s) {
  char ch(getchar());
  while (ch == ' ' || ch == '\r' || ch == '\n') ch = getchar();
  char *tar = s;
  *tar = ch, ch = getchar();
  while (ch != ' ' && ch != '\r' && ch != '\n' && ch != EOF)
    *(++tar) = ch, ch = getchar();
  return tar - s + 1;
}
const int N = 100005;
int main() {
  int n;
  read(n);
  if ((n & 3) > 1) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  int cnt = n >> 2;
  for (int i = 0; i < cnt; ++i) {
    for (int j = i + 1; j < cnt; ++j) {
      printf("%d %d\n", 1 + (i << 2), 5 + (j << 2) - 4);
      printf("%d %d\n", 1 + (i << 2), 6 + (j << 2) - 4);
      printf("%d %d\n", 1 + (i << 2), 7 + (j << 2) - 4);
      printf("%d %d\n", 2 + (i << 2), 5 + (j << 2) - 4);
      printf("%d %d\n", 2 + (i << 2), 8 + (j << 2) - 4);
      printf("%d %d\n", 1 + (i << 2), 8 + (j << 2) - 4);
      printf("%d %d\n", 2 + (i << 2), 7 + (j << 2) - 4);
      printf("%d %d\n", 3 + (i << 2), 5 + (j << 2) - 4);
      printf("%d %d\n", 4 + (i << 2), 6 + (j << 2) - 4);
      printf("%d %d\n", 3 + (i << 2), 6 + (j << 2) - 4);
      printf("%d %d\n", 2 + (i << 2), 6 + (j << 2) - 4);
      printf("%d %d\n", 3 + (i << 2), 7 + (j << 2) - 4);
      printf("%d %d\n", 4 + (i << 2), 5 + (j << 2) - 4);
      printf("%d %d\n", 4 + (i << 2), 8 + (j << 2) - 4);
      printf("%d %d\n", 3 + (i << 2), 8 + (j << 2) - 4);
      printf("%d %d\n", 4 + (i << 2), 7 + (j << 2) - 4);
    }
  }
  if ((n & 3) == 1) {
    for (int i = 0; i < cnt; ++i) {
      printf("%d %d\n", 1 + (i << 2), 2 + (i << 2));
      printf("%d %d\n", 1 + (i << 2), 3 + (i << 2));
      printf("%d %d\n", 1 + (i << 2), 4 + (i << 2));
      printf("%d %d\n", 2 + (i << 2), 3 + (i << 2));
      printf("%d %d\n", 2 + (i << 2), n);
      printf("%d %d\n", 3 + (i << 2), n);
      printf("%d %d\n", 1 + (i << 2), n);
      printf("%d %d\n", 3 + (i << 2), 4 + (i << 2));
      printf("%d %d\n", 2 + (i << 2), 4 + (i << 2));
      printf("%d %d\n", 4 + (i << 2), n);
    }
  } else {
    for (int i = 0; i < cnt; ++i) {
      printf("%d %d\n", 1 + (i << 2), 2 + (i << 2));
      printf("%d %d\n", 1 + (i << 2), 3 + (i << 2));
      printf("%d %d\n", 2 + (i << 2), 4 + (i << 2));
      printf("%d %d\n", 1 + (i << 2), 4 + (i << 2));
      printf("%d %d\n", 2 + (i << 2), 3 + (i << 2));
      printf("%d %d\n", 3 + (i << 2), 4 + (i << 2));
    }
  }
  return 0;
}