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 long double PI = acos(-1);
const long double eps = 0.0000000001;
const long long INF = 0x3fffffffffffffff;
long long n, v[1005], lim;
bool did[1005][1005];
long long dfn[1005][1005];
void work(long long a, long long b) {
  did[a][b] = did[b][a] = true;
  dfn[a][b] = dfn[b][a] = -1;
  std::cout << a << ' ' << b << std::endl;
}
void work4(long long a, long long b, long long c, long long d) {
  work(a, b);
  work(a, c);
  work(b, d);
  work(a, d);
  work(b, c);
  work(c, d);
}
void work5(long long a, long long b, long long c, long long d, long long e) {
  work(a, b);
  work(a, c);
  work(a, d);
  work(b, c);
  work(b, e);
  work(c, e);
  work(a, e);
  work(c, d);
  work(b, d);
  work(d, e);
}
void work2_4(long long a, long long b, long long c, long long d, long long e,
             long long f, long long g, long long h) {
  work(a, e);
  work(a, f);
  work(a, g);
  work(b, e);
  work(b, h);
  work(a, h);
  work(b, g);
  work(c, e);
  work(d, f);
  work(c, f);
  work(b, f);
  work(c, g);
  work(d, e);
  work(d, h);
  work(c, h);
  work(d, g);
}
void dfs(long long tim, long long good) {
  for (long long i = 1; i <= n; ++i) {
    if (v[i] != i) {
      bool can = false;
      for (long long j = 1; j < i; ++j) can |= !dfn[j][i];
      for (long long j = i + 1; j <= n; ++j) can |= !dfn[i][j];
      if (!can) return;
    }
  }
  if (tim == lim && good == n) {
    for (long long t = 1; t <= tim; ++t)
      for (long long i = 1; i <= n; ++i)
        for (long long j = i + 1; j <= n; ++j)
          if (dfn[i][j] == t) std::cout << i << ' ' << j << std::endl;
    exit(0);
  }
  for (long long i = 1; i <= n; ++i)
    for (long long j = i + 1; j <= n; ++j)
      if (!dfn[i][j]) {
        dfn[i][j] = tim + 1;
        good -= (i == v[i]);
        good -= (j == v[j]);
        std::swap(v[i], v[j]);
        good += (i == v[i]);
        good += (j == v[j]);
        dfs(tim + 1, good);
        good -= (i == v[i]);
        good -= (j == v[j]);
        std::swap(v[i], v[j]);
        good += (i == v[i]);
        good += (j == v[j]);
        dfn[i][j] = 0;
      }
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin >> n;
  for (long long i = 1; i <= n; ++i) v[i] = i;
  switch (n % 4) {
    case 0:
      std::cout << "YES" << std::endl;
      for (long long i = 4; i <= n; i += 4) work4(i - 3, i - 2, i - 1, i);
      for (long long i = 4; i <= n; i += 4)
        for (long long j = i + 4; j <= n; j += 4)
          work2_4(i - 3, i - 2, i - 1, i, j - 3, j - 2, j - 1, j);
      break;
    case 1:
      std::cout << "YES" << std::endl;
      for (long long i = 4; i <= n; i += 4) work5(i - 3, i - 2, i - 1, i, n);
      for (long long i = 4; i <= n; i += 4)
        for (long long j = i + 4; j <= n; j += 4)
          work2_4(i - 3, i - 2, i - 1, i, j - 3, j - 2, j - 1, j);
      break;
    case 2:
    case 3:
      std::cout << "NO" << std::endl;
      break;
  }
  return 0;
}