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;
const int INF = 1001001001;
const long long INFLL = 1001001001001001001LL;
template <typename T>
void pv(T a, T b) {
  for (T i = a; i != b; ++i) cout << *i << " ";
  cout << endl;
}
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
vector<pair<int, int> > sol4{{0, 1}, {0, 2}, {1, 3}, {0, 3}, {1, 2}, {2, 3}};
vector<pair<int, int> > sol44{{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}};
bool check(vector<pair<int, int> > &vp) {
  for (int i = 0; i < (int)(4); ++i) {
    int k = i;
    for (pair<int, int> p : vp) {
      if (p.first == k)
        k = p.second;
      else if (p.second == k)
        k = p.first;
    }
    if (k != i) return false;
  }
  return true;
}
void solve4(int s, int e) {
  for (pair<int, int> p : sol4) {
    if ((p.first == 0 && p.second == 1 || p.first == 2 && p.second == 3) &&
        e % 4 == 1) {
      cout << s + p.first + 1 << ' ' << e << '\n';
      cout << s + p.first + 1 << ' ' << s + p.second + 1 << '\n';
      cout << s + p.second + 1 << ' ' << e << '\n';
    } else {
      cout << s + p.first + 1 << ' ' << s + p.second + 1 << '\n';
    }
  }
}
void solve44(int a, int b) {
  for (pair<int, int> p : sol44) {
    cout << a + p.first + 1 << ' ' << b + p.second + 1 << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  if (n % 4 == 2 || n % 4 == 3)
    cout << "NO" << '\n';
  else {
    cout << "YES" << '\n';
    for (int i = 0; i < (int)(n / 4); ++i) {
      solve4(i * 4, n);
    }
    for (int i = 0; i < (int)(n / 4); ++i) {
      for (int j = (int)(i + 1); j < (int)(n / 4); ++j) {
        solve44(i * 4, j * 4);
      }
    }
  }
  return 0;
}