An undirected graph is called *k*-regular, if the degrees of all its vertices are equal *k*. An edge of a connected graph is called a bridge, if after removing it the graph is being split into two connected components.

Build a connected undirected *k*-regular graph containing at least one bridge, or else state that such graph doesn't exist.
The single line of the input contains integer *k* (1 ≤ *k* ≤ 100) — the required degree of the vertices of the regular graph.
import math
import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

k = int(input())
if k == 1:
    ans = ["YES", "2 1", "1 2"]
elif not k % 2:
    ans = ["NO"]
else:
    ans = ["YES"]
    n = 2002
    e = ["1 1001", "1002 2002", "1001 2002"]
    for i in range(1, 1001):
        e.append(" ".join(map(str, (i, i + 1))))
    for i in range(1002, 2002):
        e.append(" ".join(map(str, (i, i + 1))))
    for i in range(1, 501):
        e.append(" ".join(map(str, (i, i + 500))))
    for i in range(1002, 1502):
        e.append(" ".join(map(str, (i, i + 500))))
    d = 2
    for _ in range(k // 2 - 1):
        g = math.gcd(1001, d)
        for i in range(g):
            j = i
            for _ in range(1001 // g):
                k = (j + d) % 1001
                e.append(" ".join(map(str, (j + 1, k + 1))))
                e.append(" ".join(map(str, (j + 1002, k + 1002))))
                j = k
        d += 1
    m = len(e)
    ans.append(" ".join(map(str, (n, m))))
    ans.append("\n".join(e))
sys.stdout.write("\n".join(ans))