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 tf1[10] = {0, 1, 3, 1, 2, 1, 2};
const int tf2[10] = {0, 2, 4, 4, 3, 3, 4};
const int tf3[20] = {0, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4};
const int tf4[20] = {0, 1, 2, 2, 1, 3, 4, 4, 3, 1, 2, 2, 1, 3, 4, 4, 3};
int n, cnt;
void pri1(int x) {
  x--;
  x *= 4;
  for (int i = 1; i <= 6; i++) {
    printf("%d %d\n", tf1[i] + x, tf2[i] + x);
  }
}
void pri2(int x, int y) {
  x--;
  x *= 4;
  y--;
  y *= 4;
  for (int i = 1; i <= 16; i++) {
    printf("%d %d\n", tf3[i] + x, tf4[i] + y);
  }
}
void pri3(int x) {
  x--;
  x *= 4;
  for (int i = 1; i <= 6; i++) {
    printf("%d %d\n", tf1[i] + x, tf2[i] + x);
    if (i == 4) {
      printf("%d %d\n", 1 + x, n);
      printf("%d %d\n", 2 + x, n);
    }
    if (i == 6) {
      printf("%d %d\n", 4 + x, n);
      printf("%d %d\n", 3 + x, n);
    }
  }
}
int main() {
  scanf("%d", &n);
  if (n % 4 == 2 || n % 4 == 3) {
    printf("NO\n");
  } else {
    if (n % 4 == 0) {
      printf("YES\n");
      for (int i = 1; i <= n / 4; i++) {
        pri1(i);
        cnt += 6;
      }
      for (int i = 1; i <= n / 4; i++) {
        for (int j = i + 1; j <= n / 4; j++) {
          pri2(i, j);
          cnt += 16;
        }
      }
    } else {
      if (n == 1) {
        printf("YES\n");
      } else {
        printf("YES\n");
        for (int i = 1; i <= n / 4; i++) {
          pri3(i);
          cnt += 10;
        }
        for (int i = 1; i <= n / 4; i++) {
          for (int j = i + 1; j <= n / 4; j++) {
            pri2(i, j);
            cnt += 16;
          }
        }
      }
    }
  }
  return 0;
}