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;
void add(vector<pair<int, int> > &ans, int pos1, int pos2) {
  pos1 <<= 2;
  pos2 <<= 2;
  for (int k = 0; k < 4; k++)
    for (int i = 0; i < 4; i++)
      ans.push_back(pair<int, int>(pos1 + i, pos2 + (i ^ k)));
}
int dx[] = {0, 0, 1, 0, 1, 2}, dy[] = {1, 2, 3, 3, 2, 3};
void add4(vector<pair<int, int> > &ans, int pos) {
  pos <<= 2;
  for (int i = 0; i < 6; i++)
    ans.push_back(pair<int, int>(pos + dx[i], pos + dy[i]));
}
vector<pair<int, int> > make4(int n) {
  vector<pair<int, int> > ans;
  for (int i = 0; i < n / 4; i++) add4(ans, i);
  for (int i = 0; i < n / 4; i++)
    for (int j = 0; j < i; j++) add(ans, j, i);
  return ans;
}
int n;
void solve() {
  vector<pair<int, int> > ans;
  if (n % 4 == 0)
    ans = make4(n);
  else if (n % 4 == 1) {
    vector<pair<int, int> > tmp = make4(n - 1);
    for (int i = 0; i < tmp.size(); i++) {
      pair<int, int> p = tmp[i];
      int x = p.first, y = p.second;
      if (x > y) swap(x, y);
      if (y == x + 1 && y % 2) {
        ans.push_back(pair<int, int>(n - 1, x));
        ans.push_back(pair<int, int>(x, y));
        ans.push_back(pair<int, int>(n - 1, y));
      } else
        ans.push_back(p);
    }
  } else {
    puts("NO");
    return;
  }
  puts("YES");
  for (int i = 0; i < ans.size(); i++) {
    pair<int, int> p = ans[i];
    if (p.first > p.second) swap(p.first, p.second);
    printf("%d %d\n", p.first + 1, p.second + 1);
  }
}
int main() {
  while (~scanf("%d", &n)) solve();
  return 0;
}