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;
using pii = pair<int, int>;
const int MAXN = 1010;
int n;
int first[MAXN];
vector<pii> s;
vector<pii> sw = {{0, 4}, {0, 5}, {0, 6}, {1, 4}, {1, 7}, {0, 7},
                  {1, 6}, {2, 4}, {3, 5}, {2, 5}, {1, 5}, {2, 6},
                  {3, 4}, {3, 7}, {2, 7}, {3, 6}};
void go(int i, int j) {
  if (i > j) swap(i, j);
  swap(first[i], first[j]);
  s.push_back({i, j});
}
bool check() {
  for (int i = (0); i < (n); ++i) first[i] = i;
  for (int i = (0); i < ((int)s.size()); ++i)
    swap(first[s[i].first], first[s[i].second]);
  for (int i = (0); i < (n); ++i)
    if (first[i] != i) return false;
  return true;
}
int main(void) {
  scanf("%d", &n);
  if (n % 4 > 1) {
    printf("NO\n");
    return 0;
  }
  if (n % 4 == 1) {
    int x = n - 1;
    for (int i = 0; i < n - 1; i += 4) {
      go(i, x);
      go(i, i + 1);
      go(i + 1, x);
      go(i + 2, x);
      go(i + 2, i + 3);
      go(i + 3, x);
      go(i, i + 3);
      go(i + 1, i + 2);
      go(i, i + 2);
      go(i + 1, i + 3);
    }
  } else {
    for (int i = 0; i < n; i += 4) {
      go(i, i + 1);
      go(i + 2, i + 3);
      go(i, i + 3);
      go(i + 1, i + 2);
      go(i, i + 2);
      go(i + 1, i + 3);
    }
  }
  for (int i = 0; i < n - 1; i += 4)
    for (int j = 0; j < i; j += 4) {
      for (auto p : sw) go(i + p.first, j + p.second - 4);
    }
  printf("YES\n");
  for (int i = (0); i < ((int)s.size()); ++i)
    printf("%d %d\n", s[i].first + 1, s[i].second + 1);
  assert(check());
  return 0;
}