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>
#pragma GCC optimize("Ofast,unroll-loops,fast-math")
using namespace std;
long long poww(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * poww(a * a % md, b / 2, md) % md
                      : poww(a * a % md, b / 2, md) % md));
}
const int maxn = 1000 * 100 + 5;
const long long inf = 9223372036854775807;
const long long mod = 1e9 + 7;
const int lg = 20;
long long n, flag;
void sag(int x1, int x2, int x3, int x4) {
  cout << x1 << " " << x2 << endl << x3 << " " << x4 << endl;
  cout << x1 << " " << x4 << endl << x2 << " " << x3 << endl;
  cout << x1 << " " << x3 << endl << x2 << " " << x4 << endl;
}
void sag2(int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8) {
  cout << x1 << " " << x6 << endl
       << x2 << " " << x7 << endl
       << x3 << " " << x8 << endl
       << x4 << " " << x5 << endl;
  cout << x1 << " " << x5 << endl
       << x2 << " " << x6 << endl
       << x3 << " " << x7 << endl
       << x4 << " " << x8 << endl;
  cout << x1 << " " << x7 << endl
       << x2 << " " << x8 << endl
       << x3 << " " << x5 << endl
       << x4 << " " << x6 << endl;
  cout << x1 << " " << x8 << endl
       << x2 << " " << x5 << endl
       << x3 << " " << x6 << endl
       << x4 << " " << x7 << endl;
}
void sag3(int x1, int x2, int x3, int x4, int x5) {
  cout << x1 << " " << x3 << endl << x2 << " " << x4 << endl;
  cout << x1 << " " << x5 << endl << x1 << " " << x2 << endl;
  cout << x2 << " " << x5 << endl << x3 << " " << x5 << endl;
  cout << x3 << " " << x4 << endl << x4 << " " << x5 << endl;
  cout << x1 << " " << x4 << endl << x2 << " " << x3 << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  if (n % 4 == 2 || n % 4 == 3) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  if (n % 4) {
    n--;
    for (int i = 1; i <= n; i += 4) {
      sag3(i, i + 1, i + 2, i + 3, n + 1);
    }
  } else {
    for (int i = 1; i <= n; i += 4) {
      sag(i, i + 1, i + 2, i + 3);
    }
  }
  n -= n % 4;
  for (int i = 1; i <= n; i += 4) {
    for (int j = i + 4; j <= n; j += 4) {
      sag2(i, i + 1, i + 2, i + 3, j, j + 1, j + 2, j + 3);
    }
  }
}