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:
//package org.javadov.codeforces.contest411virtual;

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by asgar on 2/21/17.
 */

public class TaskE {
    public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        if ( (n&3) > 1) {
            out.println("NO");
            return;
        }
        out.println("YES");

        int one=1, two=2, three=3, four=4;
        for (int iteration = 0; iteration < n / 4; iteration++) {
            for (int i = two; i < n; i++)
                out.println(one + " " + i);
            out.println(two + " " + n);
            out.println(one + " " + n);
            for (int i = n-1; i > two; --i)
                out.println(two + " " + i);
            for (int i=four; i < n; i++)
                out.println(three + " " + i);
            if (four != n)  out.println(four + " " + n);
            out.println(three + " " + n);
            for (int i = n-1; i > four; --i)
                out.println(four + " " + i);
            one += 4; two += 4; three += 4; four += 4;
        }


        return;
    }

    public static void main(String[] args) throws IOException {
        try (InputReader reader = new InputReader(System.in);
             PrintWriter writer = new PrintWriter(System.out)) {
            new TaskE().solve(1, reader, writer);
            writer.flush();
        }
    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() throws IOException {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                String line = readLine();
                if (line == null)
                    return null;
                tokenizer = new StringTokenizer(line);
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() throws IOException {
            return Integer.valueOf(next());
        }

        public Long nextLong() throws IOException {
            return Long.valueOf(next());
        }

        public int[] readIntArray (int size) throws IOException {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = nextInt();
            return array;
        }
    }

    static class FastWriter extends PrintWriter {
        public FastWriter(OutputStream outputStream) {
            super(outputStream);
        }
    }
}