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 JAVA):

Solution:
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
  static Scanner sc = new Scanner(System.in);
  static PrintWriter writer = new PrintWriter(System.out);
  static int[][] five = {{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 4}, {2, 4}, {0, 4}, {2, 3}, {1, 3}, {3, 4}};
  static int[][] five2 = {{0, 1},{0, 2},{0, 3},{1, 2},{1, 3},{2, 3},{2, 4},{3, 4},{0, 4},{1, 4}};
  static int[][] four = {{0, 1}, {0, 2}, {1, 3}, {0, 3}, {1, 2}, {2, 3}};
  static int[][] four2 = {{0, 1},{0, 3},{0, 2},{1, 3},{1, 2},{2, 3}};
  static int N;

  public static void main(String[] args) {
    N = sc.nextInt();
    if (N % 4 == 2 || N % 4 == 3) {
      System.out.println("NO");
      return;
    }
    System.out.println("YES");
    for (int i = N; i > 1; i -= 4) {
      solve(i);
    }
    writer.flush();
  }

  static void solve(int n) {
    for (int i = n - 8; i >= 0; i -= 4) {
      swap(i, n - 4);
    }
    if (n % 4 == 0) {
      int[][] swaps = N / 4 % 2 == 0 ? four2 : four;
      for (int[] pair : swaps) {
        out(pair[0] + n - 4, pair[1] + n - 4);
      }
    } else {
      int[][] swaps = N / 4 % 2 == 0 ? five2 : five;
      for (int[] pair : swaps) {
        out(pair[0] == 0 ? 0 : pair[0] + n - 5, pair[1] + n - 5);
      }
    }
  }

  static void swap(int p1, int p2) {
    for (int i = 0; i < 4; i++) {
      out(p1 + i, p2 + i);
    }
    for (int i = 0; i < 4; i++) {
      out(p1 + i, p2 + (i + 1) % 4);
    }
    for (int i = 0; i < 4; i++) {
      out(p1 + i, p2 + (i + 2) % 4);
    }
    for (int i = 0; i < 4; i++) {
      out(p1 + i, p2 + (i + 3) % 4);
    }
  }

  static void out(int a, int b) {
    writer.println((a + 1) + " " + (b + 1));
  }

}