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;
constexpr long long mod = 998244353;
const long long INF = mod * mod;
const long double eps = 1e-12;
const long double pi = acos(-1.0);
long long mod_pow(long long a, long long n, long long m = mod) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * a % m;
    a = a * a % m;
    n >>= 1;
  }
  return res;
}
struct modint {
  long long n;
  modint() : n(0) { ; }
  modint(long long m) : n(m) {
    if (n >= mod)
      n %= mod;
    else if (n < 0)
      n = (n % mod + mod) % mod;
  }
  operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
modint operator+=(modint &a, modint b) {
  a.n += b.n;
  if (a.n >= mod) a.n -= mod;
  return a;
}
modint operator-=(modint &a, modint b) {
  a.n -= b.n;
  if (a.n < 0) a.n += mod;
  return a;
}
modint operator*=(modint &a, modint b) {
  a.n = ((long long)a.n * b.n) % mod;
  return a;
}
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, int n) {
  if (n == 0) return modint(1);
  modint res = (a * a) ^ (n / 2);
  if (n % 2) res = res * a;
  return res;
}
long long inv(long long a, long long p) {
  return (a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p);
}
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }
const int max_n = 10000;
modint fact[max_n], factinv[max_n];
void init_f() {
  fact[0] = modint(1);
  for (int i = 0; i < max_n - 1; i++) {
    fact[i + 1] = fact[i] * modint(i + 1);
  }
  factinv[max_n - 1] = modint(1) / fact[max_n - 1];
  for (int i = max_n - 2; i >= 0; i--) {
    factinv[i] = factinv[i + 1] * modint(i + 1);
  }
}
modint comb(int a, int b) {
  if (a < 0 || b < 0 || a < b) return 0;
  return fact[a] * factinv[b] * factinv[a - b];
}
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
vector<pair<int, int> > b4 = {{2, 3}, {1, 2}, {3, 4}, {1, 3}, {2, 4}, {1, 4}};
vector<pair<int, int> > b44 = {{1, 1}, {4, 4}, {2, 3}, {3, 2}, {1, 2}, {2, 1},
                               {3, 4}, {4, 3}, {1, 3}, {3, 1}, {2, 4}, {4, 2},
                               {1, 4}, {4, 1}, {2, 2}, {3, 3}};
vector<pair<int, int> > b5 = {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 5},
                              {3, 5}, {1, 5}, {3, 4}, {2, 4}, {4, 5}};
vector<pair<int, int> > ans0(int n) {
  if (n == 4) {
    return b4;
  }
  vector<pair<int, int> > res = ans0(n - 4);
  int le = n - 4;
  for (int i = 0; i < 6; i++) {
    res.push_back({le + b4[i].first, le + b4[i].second});
  }
  int d = n / 4;
  for (int i = 0; i < d - 1; i++) {
    int l = 4 * i;
    for (int j = 0; j < 16; j++) {
      res.push_back({l + b44[j].first, le + b44[j].second});
    }
  }
  return res;
}
vector<pair<int, int> > ans1(int n) {
  if (n == 5) {
    return b5;
  }
  vector<pair<int, int> > res = ans1(n - 4);
  int d = n / 4;
  int le = n - 4;
  for (int i = 0; i < d - 1; i++) {
    int l = 4 * i + 1;
    for (int j = 0; j < 16; j++) {
      res.push_back({l + b44[j].first, le + b44[j].second});
    }
  }
  for (int i = 0; i < b5.size(); i++) {
    int l = b5[i].first;
    int r = b5[i].second;
    if (l == 1) {
      res.push_back({1, le + r - 1});
    } else {
      res.push_back({le + l - 1, le + r - 1});
    }
  }
  return res;
}
void solve() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "YES\n";
    return;
  }
  if (n % 4 == 2 || n % 4 == 3) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  if (n % 4 == 0) {
    vector<pair<int, int> > ans = ans0(n);
    for (int i = 0; i < ans.size(); i++) {
      int l = ans[i].first, r = ans[i].second;
      cout << l << " " << r << "\n";
    }
  } else {
    vector<pair<int, int> > ans = ans1(n);
    for (int i = 0; i < ans.size(); i++) {
      int l = ans[i].first, r = ans[i].second;
      cout << l << " " << r << "\n";
    }
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  char nyaa;
  cin >> nyaa;
  return 0;
}