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

Solution:
n = input()
if n==1:
	print "YES"
	exit()
elif n==2:
	print "NO"
	exit()
elif n==3:
	print "NO"
	exit()

arr = []
pos = dict()

def output(x,y,st=""):
	print x,y

def switchTwoElement(x, y):
	global flag
	global n
	if flag==1 and abs(x-y)==1 and min(x,y)%2==1:
		output (x, n)
		output (x, y)
		output (y, n)
	else:
		output (x, y)

def make2(i, j):
	switchTwoElement(i+3,j+2) 
	switchTwoElement(i+2,j+2) 
	switchTwoElement(i+3,j+1) 
	switchTwoElement(i,j+1) 
	switchTwoElement(i+1,j+3) 
	switchTwoElement(i+2,j+3) 
	switchTwoElement(i+1,j+2) 
	switchTwoElement(i+1,j+1) 
	switchTwoElement(i+3,j) 
	switchTwoElement(i+3,j+3) 
	switchTwoElement(i,j+2) 
	switchTwoElement(i,j+3) 
	switchTwoElement(i+2,j) 
	switchTwoElement(i+2,j+1) 
	switchTwoElement(i+1,j) 
	switchTwoElement(i,j)

def make4(x,y):
	switchTwoElement (x,x+1)
	switchTwoElement (x,y+1)
	switchTwoElement (x+1,y)
	switchTwoElement (x,y)
	switchTwoElement (x+1,y+1)
	switchTwoElement (y,y+1)

for i in range(1,n+1):
	arr.append(i)
	pos[i]=i-1

flag = 0
if n%4==1:
	flag=1
if n%4==0 or n%4==1:
	print("YES")
	nClasses=int(n/4)
	for i in range(1,n,4):
		make4(i,i+2)
	for i in range(1,nClasses):
		for j in range(i+1,nClasses+1):
			make2(4*(i-1)+1, 4*(j-1)+1)
else:
	print "NO"