You are given integer $n$. You have to arrange numbers from $1$ to $2n$, using each of them exactly once, on the circle, so that the following condition would be satisfied:

For every $n$ consecutive numbers on the circle write their sum on the blackboard. Then any two of written on the blackboard $2n$ numbers differ not more than by $1$.

For example, choose $n = 3$. On the left you can see an example of a valid arrangement: $1 + 4 + 5 = 10$, $4 + 5 + 2 = 11$, $5 + 2 + 3 = 10$, $2 + 3 + 6 = 11$, $3 + 6 + 1 = 10$, $6 + 1 + 4 = 11$, any two numbers differ by at most $1$. On the right you can see an invalid arrangement: for example, $5 + 1 + 6 = 12$, and $3 + 2 + 4 = 9$, $9$ and $12$ differ more than by $1$.

 [Image] 


-----Input-----

The first and the only line contain one integer $n$ ($1 \le n \le 10^5$).


-----Output-----

If there is no solution, output "NO" in the first line. 

If there is a solution, output "YES" in the first line. In the second line output $2n$ numbers — numbers from $1$ to $2n$ in the order they will stay in the circle. Each number should appear only once. If there are several solutions, you can output any of them.


-----Examples-----
Input
3

Output
YES
1 4 5 2 3 6 
Input
4

Output
NO


-----Note-----

Example from the statement is shown for the first example. 

It can be proved that there is no solution in the second example.

Difficulty: competition

Starter code:

Solutions:
def main():
    n = int(input())
    ans = [0] * (2 * n)
    for i in range(n):
        a = 2 * i + 1
        b = 2 * i + 2
        if i & 1:
            ans[i] = a
            ans[i + n] = b
        else:
            ans[i] = b
            ans[i + n] = a
    ans *= 2
    curr = sum(ans[:n])
    mi = curr
    ma = curr
    for i in range(n, 4 * n):
        curr -= ans[i - n]
        curr += ans[i]
        mi = min(mi, curr)
        ma = max(ma, curr)
    if ma - mi > 1:
        print("NO")
    else:
        print("YES")
        print(*ans[:2*n])
    return 0

main()

import sys
input = sys.stdin.readline

n=int(input())

if n%2==0:
    print("NO")
else:
    print("YES")
    ANS=[0]*(2*n)
    for i in range(n):
        if i%2==0:
            ANS[i]=(i+1)*2-1
            ANS[i+n]=(i+1)*2

        else:
            ANS[i]=(i+1)*2
            ANS[i+n]=(i+1)*2-1

    print(*ANS)
            
        
    


import sys

n = int(sys.stdin.readline().strip())
if n % 2 == 0:
    print("NO")
else:
    print("YES")
    x = []
    y = []
    for i in range (1, 2 * n + 1):
        if i % 4 == 1 or i % 4 == 0:
            x.append(i)
        else:
            y.append(i)
    print(" ".join(list(map(str,x))) + " " + " ".join(list(map(str,y))))

N = int(input())

if N % 2 == 0:
    print("NO")
else:
    print("YES")
    X = [-1] * (2*N)
    a = 1
    b = 2 * N
    i = 0
    while i < N:
        X[i] = a
        X[i+N] = a + 1
        i += 1
        if i >= N: break
        X[i] = b
        X[i+N] = b - 1
        i += 1
        a += 2
        b -= 2
    
    print(*X)


def find(n):
    ans=[0]*(2*n)
    if n%2==0:
        return []
    
    temp=0
    for i in range(1,n+1):
        left=2*i-1
        right=2*i
        if temp%2==0:
            ans[i-1]=left
            ans[i+n-1]=right
        else:
            ans[i-1]=right
            ans[i+n-1]=left
        temp+=1
    return ans
n=int(input())
ans=find(n)
if ans==[]:
    print("NO")
else:
    print("YES")
    print(*ans)

n = int(input())

if n % 2 == 0:
    print('NO')

else:
    first_half = [1]
    second_half = [2]

    for i in range(n - 1):
        first_half.append((first_half[i] + 3) if i % 2 == 0 else (first_half[i] + 1))
        second_half.append((second_half[i] + 1) if i % 2 == 0 else (second_half[i] + 3))

    print('YES')
    print(*(first_half + second_half))


n = int(input())
if n%2 == 0:
    print("NO")
else:
    print("YES")
    sum = 2*n +1
    arr = [0]*2*n
    arr[0] = 1
    arr[2*n-1] =2*n
    i = 0
    for k in range(2,n+1):
        if arr[(i+n)%(2*n)] == 0:
            i = (i+n)%(2*n)
            arr[i] = k
            arr[2*n-1-i] = sum - k
        else:
            i = i + 1
            arr[i] = k
            arr[2*n-1-i] = sum - k
    for x in arr:
        print(x,end = " ")


import sys
n=int(input())
if(n%2==0):
    print("NO")
    return
ans=[]
used=[]
def add(x):
    if(used[x]==0 and x<=2*n):
        used[x]=1
        ans.append(x);

for i in range(2*n+7):
    used.append(0)

ans.append(1)
used[1]=1
p=int(4)
while True:
    if(used[p]==1):
        break
    add(p)
    p+=1
    add(p)
    p+=3
    if(p>2*n):
        p=2
print("YES")
for i in range(2*n):
    print(ans[i],end=' ')

n = int(input());
if n % 2 == 0:
    print("NO");
else:
    ans = [];
    for i in range(2*n):
        ans.append(0);
    current = 1;
    for i in range(n):
        ans[i] = current if i % 2 == 0 else current+1;
        ans[n+i] = current+1 if i % 2 == 0 else current;
        current += 2;
    print("YES");
    for i in range(2*n):
        print("{} ".format(ans[i]), end='');

def most_equal(n):
    if n % 2 == 0:
        return [["NO"]]
    a = list()
    for i in range(1, 2 * n + 1):
        if i <= n:
            a.append(2 * i - i % 2)
        else:
            a.append(2 * (i - n) - i % 2)
    return [["YES"], a]


m = int(input())
for elem in most_equal(m):
    print(*elem)


n = int(input())
ans = [0 for a in range (n)]
if n % 2 == 0:
   print("NO")
else:
   print("YES")
   l = []
   r = []
   for i in range(0, n - 1, 2) :
      l.append(2 * i);
      l.append(2 * i + 3)
      r.append(2 * i + 1)
      r.append(2 * i + 2)
   l.append(2 * n - 2)
   r.append(2 * n - 1)
   for x in l :
      print(x + 1, end = ' ')
   for x in r :
      print(x + 1, end = ' ')

n = int(input())

if n % 2 == 0:
    print('NO')
    return

print('YES')

for i in range(n):
    print(2*i + i % 2 + 1, end=' ')
for i in range(n):
    print(2*i - i % 2 + 2, end=' ')
print()


n = int(input())
if n%2==0:
    print("NO")

else:
    print("YES")
    l = [0 for i in range(2*n)]
    for i in range(n):
        if i % 2 == 0:
            l[i] = i*2+1
            l[i+n] = l[i]+1
        else:
            l[i] = i*2+2
            l[i+n] = l[i]-1

    print(*l)


n = int(input())
if n%2 == 0:
    print('NO')
else:
    a = [1]
    b = []
    i = 2
    c = 1
    while i<2*n:
        if c:
            b.append(i)
            b.append(i+1)
            c = 0
        else:
            a.append(i)
            a.append(i+1)
            c = 1
        i += 2
    b.append(2*n)
    ans = a + b
    print("YES")
    print(" ".join(str(x) for x in ans))

        
def even(num): 
    return(bool(num%2==0)) 

list = []
n = input()
n = int(n)
if even(n) == True:
    print("NO")
else:
    for i in range(1,n+1):
             if (not even(i)):
                 list.append(2*i-1)
             else:    
                 list.append(2*i)
    for i in range(1,n+1):
             if even(i):
                 list.append(2*i-1)
             else:
                 list.append(2*i)
    print("YES")         
    for x in list:
             print(x, end=" ")           
       

n=int(input())
if n%2:
    print('YES')
    a=[0]*(n*2)
    for i in range(n):
        if i%2:
            a[i]=i*2+2
            a[i+n]=i*2+1
        else:
            a[i]=i*2+1
            a[i+n]=i*2+2
    print(' '.join(map(str,a)))
else:
    print('NO')


'''
def sdvig():
    tmp=A[2*n-1]
    for i in range(2*n-3,0,-2):
        A[i+2]=A[i]
    A[1]=tmp

def check():
    tmp=0
    for i in range(n):
        tmp+=A[i]
    low,high=tmp,tmp
    for i in range(2*n):
        tmp-=A[i]
        tmp+=A[(i+n)%(2*n)]
        if(tmp<low):
            low=tmp
        if(tmp>high):
            high=tmp
        if(high-low>1):
            return False
    else:
        return True
for kek in range(100):
    n=int(input())
    A=[int(i) for i in range(1,2*n+1)]
    for i in range(n):
        sdvig()
        if(check()):
            print('YES')
            for i in A:
                print(i,end=' ')
            quit()
    else:
        print('NO')
        quit()
'''
def sdvig():
    tmp=A[2*(n//2)+1]
    for i in range(2*(n//2)+2,2*n,2):
        tArr.append(A[i+1])
    for i in range(1,2*n-2*(n//2),2):
        A[i+2*(n//2)]=A[i]
    A[2*n-1]=tmp
    for i in range(len(tArr)):
        A[i*2+1]=tArr[i]


n=int(input())
A=[int(i) for i in range(1,2*n+1)]
tArr=[]
if(n%2):
    sdvig()
    print('YES')
    for i in A:
        print(i,end=' ')
else:
    print('NO')
    

n=int(input())
s=''
i=2*n-1
sm=0
if (n)%2==0:
    print("NO")
elif n==1:
    print("YES")
    print("1 2")
else:
    a=[]
    while i>2:
        a.append(i)
        a.append(i-1)
        i-=4
    a.append(1)
    i=2*n
    while i>2:
        a.append(i)
        a.append(i-3)
        i-=4
    a.append(2)
    for i in range(len(a)):
        s+=str(a[i])
        s+=' '
    print("YES")
    print(s)
        
    


# 1205A Almost Equal
n = int(input())

if n % 2 == 0:
    print("NO")
else:
    print("YES")
    d = 1
    for i in range(n):
        print(d, end=' ')
        d += 3 if i % 2 == 0 else 1
    d = 2
    for i in range(n):
        print(d, end=' ')
        d += 1 if i % 2 == 0 else 3

n=int(input())
arr=[0]*(2*n)
print("NYOE S"[n%2::2])
if(n%2!=0):
 for i in range(n):
    if(i%2==0):arr[i]=2*i+1;arr[i+n]=arr[i]+1
    else:arr[i]=2*i+2;arr[i+n]=arr[i]-1
 print(*arr)


from itertools import chain
n=int(input())
print("NYOE S"[n%2::2])
v=list(chain.from_iterable((i,i+1) for i in range(1,2*n)if(i%4==0)))
c=list(map((lambda a: a-1 if(a%2==0) else a+1),v))
if(n%2!=0):print(1,*v,2,*c)

n = int(input())

if not n % 2:
    print('NO')

else:
    lower = [i for i in range(1, 2*n, 2)]
    upper = [i for i in range(2, 2*n+1, 2)]


    circle = []
    append = circle.append

    for i in range(n):
        append(lower[i] if i % 2 else upper[i])

    for i in range(n):
        append(upper[i] if i % 2 else lower[i])

    print('YES')
    print(' '.join(map(str, circle)))


n = int(input())
if not n%2:
    print('NO')
else:
    print('YES')
    print(1, end=' ')
    for i in range(4, 2*n, 4):
        print(i, i+1, end=' ')
    for i in range(2, 2*n, 4):
        print(i, i+1, end=' ')
    print(2*n)