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;
template <class T, class T2>
inline int chkmax(T &x, const T2 &y) {
  return x < y ? x = y, 1 : 0;
}
template <class T, class T2>
inline int chkmin(T &x, const T2 &y) {
  return x > y ? x = y, 1 : 0;
}
const int MAXN = (1 << 20);
int n;
void read() { cin >> n; }
vector<pair<int, int> > change_list = {
    {0, 0}, {0, 1}, {0, 2}, {1, 0}, {1, 3}, {0, 3}, {1, 2}, {2, 0},
    {3, 1}, {2, 1}, {1, 1}, {2, 2}, {3, 0}, {3, 3}, {2, 3}, {3, 2},
};
void solve() {
  if (n % 4 >= 2) {
    cout << "NO" << '\n';
    return;
  }
  cout << "YES" << '\n';
  bool odd_flag = n % 2;
  for (int i = 0; i < (n / 4); i++) {
    int a = i * 4 + 1, b = i * 4 + 2, c = i * 4 + 3, d = i * 4 + 4;
    if (odd_flag) cout << a << " " << n << '\n';
    cout << a << " " << c << '\n';
    if (odd_flag) cout << c << " " << n << '\n';
    if (odd_flag) cout << b << " " << n << '\n';
    cout << b << " " << d << '\n';
    if (odd_flag) cout << d << " " << n << '\n';
    cout << a << " " << b << '\n';
    cout << c << " " << d << '\n';
    cout << a << " " << d << '\n';
    cout << b << " " << c << '\n';
  }
  for (int i = 0; i < (n / 4); i++)
    for (int j = i + 1; j < (n / 4); j++)
      for (auto it : change_list)
        cout << 4 * i + 1 + it.first << " " << 4 * j + 1 + it.second << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  read();
  solve();
  return 0;
}