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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn = 3e6;
const long long mod = 1e9 + 7;
long long pw(long long a, long long b, long long md = mod) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res = (a * res) % md;
    }
    a = (a * a) % md;
    b >>= 1;
  }
  return (res);
}
int n;
vector<pair<int, int> > perm = {pair<int, int>(1, 2), pair<int, int>(1, 3),
                                pair<int, int>(2, 4), pair<int, int>(1, 4),
                                pair<int, int>(2, 3), pair<int, int>(3, 4)};
vector<pair<int, int> > Germ = {
    pair<int, int>(5, 1), pair<int, int>(6, 1), pair<int, int>(7, 1),
    pair<int, int>(8, 2), pair<int, int>(5, 3), pair<int, int>(5, 2),
    pair<int, int>(6, 4), pair<int, int>(5, 4), pair<int, int>(6, 2),
    pair<int, int>(8, 3), pair<int, int>(7, 3), pair<int, int>(6, 3),
    pair<int, int>(7, 2), pair<int, int>(8, 1), pair<int, int>(8, 4),
    pair<int, int>(7, 4)};
vector<pair<int, int> > Term = {pair<int, int>(1, 2), pair<int, int>(1, 3),
                                pair<int, int>(2, 3), pair<int, int>(1, 4),
                                pair<int, int>(2, 5), pair<int, int>(3, 5),
                                pair<int, int>(1, 5), pair<int, int>(3, 4),
                                pair<int, int>(2, 4), pair<int, int>(4, 5)};
void apply(int x) {
  for (auto [u, v] : perm) cout << u + x - 1 << ' ' << v + x - 1 << '\n';
}
void Apply(int x) {
  for (auto [u, v] : Term)
    cout << u + x - 1 << ' ' << ((v == 5) ? n : v + x - 1) << '\n';
}
void apply(int x, int y) {
  for (auto [u, v] : Germ) cout << v + x - 1 << ' ' << u + y - 5 << '\n';
}
int32_t main() {
  cin.tie(0)->sync_with_stdio(0);
  cin >> n;
  if (n % 4 == 3 or n % 4 == 2) cout << "NO", exit(0);
  cout << "YES" << '\n';
  if (n % 4 == 0) {
    for (int i = 1; i + 3 <= n; i += 4) apply(i);
    for (int i = 1; i + 3 <= n; i += 4)
      for (int j = 1; j < i; j += 4) apply(j, i);
  } else {
    for (int i = 1; i + 3 <= n; i += 4) Apply(i);
    for (int i = 1; i + 3 <= n; i += 4)
      for (int j = 1; j < i; j += 4) apply(j, i);
  }
  return (0);
}