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: EASY
Tags: Greedy algorithms

Mathematics

Constructive algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
import sys
input = sys.stdin.readline

def ceil(x, y):
	return (x + y - 1) // y

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(10000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
n = int(input())
x = 2 * n
ans = [0] * x
num = 1
bum = x
for i in range(n):
	if i % 2 == 0:
		ans[i] = num
		ans[(i + n) % x] = num + 1
		num += 2
	else:
		ans[i] = bum
		ans[(i + n) % x] = bum - 1
		bum -= 2
this = ans.copy()
this += this
for i in range(1, 2 * x):
	this[i] += this[i - 1]
these = set()
for i in range(n - 1, 2 * x):
	if i == n - 1:
		these.add(this[i])
	else:
		these.add(this[i] - this[i - n])
if len(these) == 1:
	print('YES')
	print(*ans)
elif len(these) == 2:
	xx = list(these)
	xxx = abs(xx[0] - xx[1])
	if xxx <= 1:
		print('YES')
		print(*ans)
	else:
		print('NO')
else:
	print('NO')


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


N = int(input())
a = [0 for i in range(2 * N)]
if N % 2 == 0:
	print('NO')
else:
	print('YES')
	a[0] = 1
	for i in range(1, N):
		if i % 2 == 1:
			a[i] = a[i - 1] + 3
		else:
			a[i] = a[i - 1] + 1
	a[N] = 2
	for i in range(N + 1, 2 * N):
		if (i - N) % 2 == 1:
			a[i] = a[i - 1] + 1
		else:
			a[i] = a[i - 1] + 3
	for i in range(0, 2 * N):
		print(a[i], end=' ')


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


import sys
f = sys.stdin
n = int(f.readline())
if n % 2 == 0:
	print('NO')
else:
	a = list(range(1, 2 * n + 1))
	b = [0] * n
	c = [0] * n
	i = 0
	j = 0
	while i < 2 * n:
		if i % 2 == 0 and i < 2 * n:
			b[j] = a[i]
			i += 3
			j += 1
		else:
			b[j] = a[i]
			j += 1
			i += 1
	i = 1
	k = 0
	while i < 2 * n:
		if i % 2 == 0 and i < 2 * n:
			c[k] = a[i]
			i += 3
			k += 1
		else:
			c[k] = a[i]
			k += 1
			i += 1
	print('YES')
	for i in range(n):
		print(b[i], end=' ')
	for i in range(n):
		print(c[i], end=' ')


number = int(input())
number_of_digits = 2 * number
digits_1 = [1]
digits_2 = [2]
number_1 = 1
number_2 = 2
for i in range(1, number):
	if i % 2 == 0:
		number_1 += 1
		number_2 += 3
		digits_1.append(number_1)
		digits_2.append(number_2)
	else:
		number_1 += 3
		number_2 += 1
		digits_1.append(number_1)
		digits_2.append(number_2)
digits = digits_1 + digits_2
add_numbers = 0
result = set()
sub = [0]
y = 0
if number != 1:
	for i in range(len(digits) + 1):
		if i >= len(digits):
			y = i % number
			add_numbers += digits[y]
		else:
			add_numbers += digits[i]
		if i >= number - 1 or y != 0:
			add_numbers -= sub[-1]
			sub.append(digits[i + 1 - number])
			result.add(add_numbers)
flag = True
if len(result) > 2:
	flag = False
string = ''
if flag:
	for i in range(len(digits)):
		string += str(digits[i]) + ' '
	print('YES')
	print(string)
else:
	print('NO')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(1):
		n = ri()
		if n % 2 == 0:
			ws('NO')
		else:
			ws('YES')
			a = []
			b = []
			z = 0
			for i in range(1, 2 * n + 1, 2):
				z += 1
				if z % 2 == 0:
					a.append(i)
					b.append(i + 1)
				else:
					b.append(i)
					a.append(i + 1)
			wia(a + b)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


n = int(input())
if n % 2 == 0:
	print('NO')
elif n == 1:
	print('YES')
	print(1, 2)
else:
	li = [0 for _ in range(2 * n + 1)]
	p = 1
	po = 1
	for i in range(n):
		li[po] = p
		p += 1
		po += n
		po %= 2 * n
		li[po] = p
		p += 1
		po += 1
	print('YES')
	print(*li[:2 * n])


from itertools import chain
n = int(input())
if n % 2 != 1:
	print('NO')
else:
	print('YES')
	print(*chain(*zip(range(1, n * 2, 2), chain(range(n + 3, n * 2 + 1, 2), range(2, n + 2, 2)))))


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:
	print('YES')
	it = [0] * (2 * n)
	a = 1
	for i in range(n):
		if i % 2 == 0:
			it[i] = a
			it[i + n] = a + 1
		else:
			it[i] = a + 1
			it[i + n] = a
		a += 2
	for i in it:
		print(i, end=' ')


n = int(input())
res = [-1] * (2 * n)
in1 = 1
f = False
if n % 2 == 0:
	print('NO')
	exit()
for i in range(n):
	if f == False:
		res[i] = in1
		in1 += 1
		res[i + n] = in1
		in1 += 1
	else:
		res[i + n] = in1
		in1 += 1
		res[i] = in1
		in1 += 1
	f = ~f
print('YES')
print(*res[:2 * n])


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


def solve(n):
	if n % 2 == 0:
		return None
	a = [None] * 2 * n
	(even_p, odd_p) = (0, n + 1)
	for i in range(n):
		current_num = i * 2 + 1
		if i % 2 == 0:
			(a[even_p], a[even_p + n]) = (current_num, current_num + 1)
			even_p += 2
		else:
			(a[odd_p], a[odd_p - n]) = (current_num, current_num + 1)
			odd_p += 2
	return a
n = int(input())
a = solve(n)
if not a:
	print('NO')
else:
	print('YES')
	print(' '.join(map(str, a)))


n = int(input())
if n % 2 == 0:
	print('NO')
	exit(0)
ans = [0] * 2 * n
ans[0] = 1
ans[n] = 2
for k in range(n):
	if k % 2 == 0:
		ans[k] = 2 * k + 1
		ans[k + n] = 2 * k + 2
	else:
		ans[k] = 2 * k + 2
		ans[k + n] = 2 * k + 1
print('YES')
print(*ans)


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


a = int(input())
if a % 2 == 0:
	print('NO')
else:
	(v, r, w) = ([1], [], 0)
	for i in range(2, 2 * a, 2):
		if w == 0:
			r.append(i)
			r.append(i + 1)
			w = 1
		else:
			v.append(i)
			v.append(i + 1)
			w = 0
	r.append(2 * a)
	print('YES')
	print(*v + r)


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


n = int(input())
if n & 1:
	print('YES')
	(t1, t2) = ([], [])
	i = t = 1
	while i <= 2 * n:
		if t & 1:
			t1.append(i)
			t2.append(i + 1)
		else:
			t2.append(i)
			t1.append(i + 1)
		i += 2
		t += 1
	t1 += t2
	print(*t1)
else:
	print('NO')


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())
if n % 2 == 0:
	print('NO')
elif n == 1:
	print('YES')
	print('1 2')
else:
	print('YES')
	circleTop = []
	circleBottom = []
	for x in range(n):
		if x % 2 == 0:
			circleTop.append(x * 2 + 1)
			circleBottom.append(x * 2 + 2)
		else:
			circleTop.append(x * 2 + 2)
			circleBottom.append(x * 2 + 1)
	print(' '.join(map(str, circleTop + circleBottom)))


n = int(input())
if n == 1:
	print('YES\n1 2')
elif n % 2 == 0:
	print('NO')
else:
	A = []
	B = []
	for i in range(n):
		if i % 2:
			A.append(2 * i + 2)
			B.append(2 * i + 1)
		else:
			A.append(2 * i + 1)
			B.append(2 * i + 2)
	print('YES')
	C = A + B
	print(' '.join(list(map(str, C))))


def f(n):
	if n % 2 == 0:
		return [['NO']]
	m = n // 2
	s = n * n + m
	p = (n << 1) + 3
	l = [1] * (n << 1)
	for i in range(1, n, 2):
		l[i] = i + 3
	for i in range(2, n, 2):
		l[i] = p - l[i - 1]
	for i in range(n, n << 1, 2):
		l[i] = l[i - n] + 1
	for i in range(n + 1, n << 1, 2):
		l[i] = l[i - n] - 1
	return [['YES'], l]
n = int(input())
[print(*r) for r in f(n)]


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=' ')


import sys
n = int(input())
if n % 2 == 0:
	print('NO')
	sys.exit()
else:
	circle = [1] * (2 * n)
	number = 2
	index = n
	while number < 2 * n:
		circle[index] = number
		circle[index + 1] = number + 1
		index += n + 1
		index %= n * 2
		number += 2
	circle[-1] = 2 * n
	print('YES')
	print(*circle)


q = int(input())
if q % 2 == 0:
	print('NO')
else:
	print('YES')
	i = 1
	while i <= q * 2:
		print(i, end=' ')
		i += 3
		if i <= q * 2:
			print(i, end=' ')
		i += 1
	i = 2
	while i <= q * 2:
		print(i, end=' ')
		i += 1
		if i <= q * 2:
			print(i, end=' ')
		i += 3


def solve(n):
	m = 2 * n
	ans = [0] * m
	x = 0
	for i in range(n):
		idx = 2 * i + 1
		ans[i] = idx + (x ^ 1)
		ans[i - n] = idx + x
		x ^= 1
	return ans

def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
	else:
		print('YES')
		print(*solve(n))
main()


n = int(input())
a = list(range(1, 2 * n + 1))
t = 2
b = []
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(1, 2 * n + 1):
		if i % 2 == 0:
			b.append(0)
		else:
			b.append(i)
	for i in range(n, 2 * n):
		if i % 2 != 0:
			b[i] = t
			t = t + 2
	for i in range(n):
		if i % 2 != 0:
			b[i] = t
			t += 2
	print(*b[::-1])


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


n = int(input())
if n % 2 == 0:
	print('NO')
	exit(0)
arr = []
for i in range(1, n + 1):
	if i % 2 == 1:
		arr.append(2 * i - 1)
	else:
		arr.append(2 * i)
for i in range(n):
	if arr[i] % 2 == 1:
		arr.append(arr[i] + 1)
	else:
		arr.append(arr[i] - 1)
print('YES')
print(*arr)


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=' ')


n = int(input())
a = [0] * (2 * n)
curr = 1
for i in range(n):
	if i % 2 == 0:
		a[i] = curr
		curr += 1
		a[i + n] = curr
		curr += 1
	else:
		a[i + n] = curr
		curr += 1
		a[i] = curr
		curr += 1
arr = a + a[:n - 1]
s = set()
window = sum(a[:n])
s.add(window)
for i in range(n, 3 * n - 1):
	window += arr[i]
	window -= arr[i - n]
	s.add(window)
if len(s) > 2:
	print('NO')
else:
	print('YES')
	print(*a)


n = int(input())
ans = [0] * (2 * n)
flag = True
cnt = 1
for i in range(n):
	idx = (i + n) % (2 * n)
	if ans[i] == 0:
		ans[i] = cnt if flag else cnt + 1
	if ans[idx] == 0:
		ans[idx] = cnt + 1 if flag else cnt
	cnt += 2
	flag = not flag
prev = ans[-1] - ans[-1 - n]
for i in range(2 * n):
	(a, b) = (ans[i - n], ans[i])
	if b - a != -prev:
		print('NO')
		break
	prev = b - a
else:
	print('YES')
	print(*ans)


I = lambda : int(input())
IL = lambda : list(map(int, input().split()))
IF = lambda : list(map(float, input().split()))
n = I()
if n % 2:
	print('YES')
	A = [0] * (2 * n)
	A[::2] = range(1, 2 * n, 2)
	for i in range(0, 2 * n, 2):
		A[(i + n) % (2 * n)] = A[i] + 1
	print(*A)
else:
	print('NO')


n = int(input())
l = []
h = []
f = 0
for j in range(1, 2 * n, 2):
	if f == 0:
		l.append(j)
		h.append(j + 1)
		f = 1
	else:
		l.append(j + 1)
		h.append(j)
		f = 0
v = l[:] + h[:]
p = abs(sum(l[:n - 1]) + h[-1] - sum(h[1:]) - l[0])
if p == 1:
	print('YES')
	print(' '.join(map(str, v)))
else:
	print('NO')


from collections import defaultdict
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	l = []
	lrev = []
	mydick = dict()
	mydick = defaultdict(lambda : 0)
	mydick[1] = 1
	mydick[2] = 1
	i = 0
	even = 4
	odd = 1
	count = 0
	while i < n:
		if i % 2 == 0:
			l.append(odd)
			lrev.append(odd + 1)
			odd += 4
		else:
			l.append(even)
			lrev.append(even - 1)
			even += 4
		i += 1
	print('YES')
	print(*l, *lrev)


n = int(input())
n *= n % 2
print('YNEOS'[n < 1::2], *(i % n * 2 + i % 2 + 1 for i in range(2 * n)))


import sys
input = sys.stdin.readline
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	it = [0] * (2 * n)
	a = 1
	for i in range(n):
		if i % 2 == 0:
			it[i] = a
			it[i + n] = a + 1
		else:
			it[i] = a + 1
			it[i + n] = a
		a += 2
	print(*it)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = []
	b = []
	z = True
	i = 1
	print('YES')
	while i < 2 * n:
		if z:
			a.append(i)
			i += 3
			z = False
		else:
			a.append(i)
			i += 1
			z = True
	(i, z) = (2, False)
	while i <= 2 * n:
		if z:
			b.append(i)
			i += 3
			z = False
		else:
			b.append(i)
			z = True
			i += 1
	a = a + b
	print(*a)


n = int(input())
l1 = []
l2 = []
k = 1
for i in range(1, 2 * n + 1, 2):
	if k % 2 == 1:
		l1.append(i)
	if k % 2 == 1:
		l2.append(i + 1)
	if k % 2 == 0:
		l1.append(i + 1)
	if k % 2 == 0:
		l2.append(i)
	k = k + 1
if sum(l1[1:]) != sum(l2[1:]):
	print('NO')
	exit()
else:
	print('YES')
	l = list(l1 + l2)
	print(*l)


n = int(input())
a = [x for x in range(1, n + 1)]
b = [x for x in range(n + 1, 2 * n + 1)]
arr = []
if n % 2 == 0:
	print('NO')
	exit()
else:
	arr = [1]
	for i in range(n - 1, -1, -2):
		if len(arr) == n:
			break
		arr.append(b[i])
		arr.append(a[i])
		if len(arr) == n:
			break
for i in range(n):
	next = arr[i]
	if next % 2 == 1:
		add = arr[i] + 1
	else:
		add = arr[i] - 1
	arr.append(add)
print('YES')
print(*arr)


import sys
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	q1 = []
	q2 = []
	x = True
	for i in range(1, 2 * n + 1, 2):
		q1.append(i if x else i + 1)
		q2.append(i + 1 if x else i)
		x = not x
	q1 += q2
	print('YES')
	print(' '.join(map(str, q1)))


n = int(input())
if n % 2 == 1:
	print('YES')
	i = 1
	while i < 2 * n - 1:
		print(i, end=' ')
		print(i + 3, end=' ')
		i += 4
	print(i, end=' ')
	i = 2
	while i < 2 * n:
		print(i, end=' ')
		print(i + 1, end=' ')
		i += 4
	print(i, end=' ')
else:
	print('NO')


def solve(n):
	arr = [0 for i in range(2 * n)]
	count = 0
	currentIndex = 0
	while count < 2 * n:
		arr[currentIndex] = count + 1
		count += 1
		if (count + 1) % 2 == 0:
			currentIndex = (currentIndex + n) % (2 * n)
		else:
			currentIndex = (currentIndex + 1) % (2 * n)
	print(*arr)
	return
n = int(input())
if n % 2 != 0:
	print('YES')
	solve(n)
else:
	print('NO')


n = int(input())
a = []
b = []
if n % 2 == 0:
	print('NO')
	exit()
i = 1
x = 0
for i in range(n):
	if i % 2 == 0:
		x = x + 1
		a.append(x)
	else:
		x = x + 3
		a.append(x)
x = 2
b.append(2)
for i in range(n - 1):
	if i % 2 == 0:
		x = x + 1
		b.append(x)
	else:
		x = x + 3
		b.append(x)
a = a + b
print('YES')
print(*a)


n = int(input())
lower = 1
upper = 2 * n
result = [0] * (2 * n)
for i in range(n):
	if i % 2:
		result[i] = upper
		result[i + n] = upper - 1
		upper -= 2
	else:
		result[i] = lower
		result[i + n] = lower + 1
		lower += 2
if n == 1 or sum(result[-n + 1:]) + result[0] in (sum(result[:n]), sum(result[:n]) + 1):
	print('YES')
	print(*result)
else:
	print('NO')


def main():
	n = int(input())
	a = list()
	if n % 2 == 0:
		print('NO')
		return
	for i in range(n * 2):
		a.append(0)
	first = 0
	second = n
	div = 0
	i = 0
	while i < 2 * n:
		if div % 2 == 0:
			a[first] = i + 1
			i += 1
			first += 1
			a[second] = i + 1
			i += 1
			second += 1
		else:
			a[second] = i + 1
			i += 1
			second += 1
			a[first] = i + 1
			i += 1
			first += 1
		div += 1
	print('YES')
	print(*a)
main()


n = int(input())
ans = [0 for i in range(2 * n)]
sign = 1
ct = 1
for i in range(n):
	if sign == -1:
		ans[i + n] = ct
		ans[i] = ct + 1
	else:
		ans[i] = ct
		ans[i + n] = ct + 1
	ct += 2
	sign *= -1
check = True
sm = sum(ans[:n])
p1 = 0
p2 = n - 1
arr = []
for i in range(2 * n):
	newsm = sm
	if i != 0:
		newsm += ans[p2] - ans[p1 - 1]
	arr.append(newsm)
	sm = newsm
	p1 = (p1 + 1) % (2 * n)
	p2 = (p2 + 1) % (2 * n)
if len(set(arr)) == 2:
	print('YES')
	for c in ans:
		print(c, end=' ')
	print()
else:
	print('NO')


n = int(input())
sp1 = [1]
sp2 = [2]
i = 2 * n
t = False
if n % 2 == 0:
	print('NO')
	t = True
while i >= 4:
	sp1.append(i)
	sp1.append(i - 3)
	sp2.append(i - 1)
	sp2.append(i - 2)
	i -= 4
if t != True:
	print('YES')
	print(*sp1 + sp2)


n = int(input())
a = []
t = 1
if n % 2 == 0:
	print('NO')
	exit()
else:
	i = 1
	while i <= 2 * n:
		if t == 1:
			a.append(i)
			t = 0
		else:
			a.append(i + 1)
			t = 1
		i += 2
	n = len(a)
	t = 1
	for i in range(n):
		if t == 1:
			a.append(a[i] + 1)
			t = 0
		else:
			a.append(a[i] - 1)
			t = 1
	print('YES')
	print(*a)


import sys
n = int(sys.stdin.read())

def solution(n):
	lst = [i for i in range(1, 2 * n + 1)]
	avg = sum(lst) / len(lst)
	if avg * n % 1 == 0:
		print('NO')
	else:
		lst1 = []
		lst2 = []
		flag = 1
		for i in range(1, 2 * n + 1, 2):
			if flag == 1:
				lst1.append(str(i))
				lst2.append(str(i + 1))
			else:
				lst1.append(str(i + 1))
				lst2.append(str(i))
			flag *= -1
		result = lst1 + lst2
		result = ' '.join(result)
		print(f'YES\n{result}')
solution(n)


N = int(input())
if N % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = [None] * (2 * N)
	for k in range(1, N + 1):
		if k % 2 == 1:
			ans[k - 1] = 2 * k - 1
			ans[N + k - 1] = 2 * k
		else:
			ans[k - 1] = 2 * k
			ans[N + k - 1] = 2 * k - 1
	for a in ans:
		print(a, end=' ')
	print()


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	(teck, i) = (0, 1)
	print(teck + 1, end=' ')
	while i < n:
		teck += 4
		print(teck, teck + 1, end=' ')
		i += 2
	(teck, i) = (2, 1)
	while i < n - 1:
		print(teck, teck + 1, end=' ')
		teck += 4
		i += 2
	print(teck)


import sys

def main():
	n = int(sys.stdin.readline())
	if n % 2 == 0:
		print('NO')
		return
	a = []
	b = []
	toggle = True
	for i in range(n):
		num = 2 * i + 1
		if i % 2 == 0:
			a.append(num)
			b.append(num + 1)
		else:
			b.append(num)
			a.append(num + 1)
	print('YES')
	print(' '.join((str(x) for x in a + b)))
main()


n = int(input())
l = []
count = 1
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(1, 2 * n + 1):
		if count <= n:
			if i == 1:
				l.append(1)
				print(1, end=' ')
			elif i % 2 == 0:
				print(l[i - 1 - 1] + 3, end=' ')
				l.append(l[i - 1 - 1] + 3)
			elif i % 2 != 0:
				print(l[i - 1 - 1] + 1, end=' ')
				l.append(l[i - 1 - 1] + 1)
			count += 1
		elif i == n + 1:
			print(2, end=' ')
		elif (i - n) % 2 == 0:
			print(l[i - n - 1] - 1, end=' ')
		elif (i - n) % 2 != 0:
			print(l[i - n - 1] + 1, end=' ')


from sys import stdin, stdout
import math
import copy
N = int(input())
if N % 2 == 0:
	print('NO')
	quit()
print('YES')
ans = [0] * (2 * N)
for i in range(N):
	if i % 2 == 0:
		A = i * 2 + 1
		B = i * 2 + 2
		ans[i] = A
		ans[i + N] = B
	else:
		A = i * 2 + 2
		B = i * 2 + 1
		ans[i] = A
		ans[i + N] = B
print(*ans)


import sys
import math
import random
input = sys.stdin.readline
n = int(input())
res = [0] * (2 * n)
i = 0
if n % 2 == 0:
	print('NO')
	exit()
value = 1
i = 0
while True:
	if res[i] != 0 or i >= n or value >= 2 * n:
		break
	res[i] = value
	res[n + i] = res[i] + 1
	if n + i + 1 >= 2 * n:
		break
	res[n + i + 1] = res[n + i] + 1
	res[i + 1] = res[n + i + 1] + 1
	value = value + 4
	i += 2
print('YES')
for i in res:
	print(i, end=' ')


import sys
input = lambda : sys.stdin.readline().strip()
n = int(input())
if n % 2:
	print('YES')
	ls1 = [1]
	ls2 = []
	for i in range(2, 2 * n + 1, 4):
		ls2.append(i)
		if i == 2 * n:
			break
		ls2.append(i + 1)
	for i in range(4, 2 * n + 1, 4):
		ls1.append(i)
		if i == 2 * n:
			break
		ls1.append(i + 1)
	for i in ls1:
		print(i, end=' ')
	for i in ls2:
		print(i, end=' ')
	print()
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	s = [0] * 2 * n
	r = 0
	c = 1
	k = 0
	for i in range(2 * n):
		s[k] = c
		c += 1
		if r == 0:
			k = k + n
		elif r == 1:
			k = k + 1
		elif r == 2:
			k = k - n
		else:
			k = k + 1
		r = (r + 1) % 4
	print(*s)


n = int(input())
n *= n % 2
a = 2 * n * [0]
for i in range(2 * n):
	a[i // 2 + (i % 2 ^ i // 2 % 2) * n] = i + 1
print('YNEOS'[n < 1::2], *a)


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


n = int(input())
N = n
if n % 2 == 0:
	print('NO')
else:
	list1 = [0] * (2 * n)
	print('YES')
	list1[0] = 1
	list1[n] = 2
	c = N - 2
	d = N
	k = N - 1
	count = 1
	for i in range(1, N):
		if count % 2 != 0:
			list1[i] = 2 * d
			list1[i + N] = 2 * d - 1
			d -= 2
			count += 1
		else:
			list1[2 * n - c] = 2 * k
			list1[2 * n - c - N] = 2 * k - 1
			c -= 2
			k -= 2
			count += 1
	ele = list1[0]
	list1 = list1[1:][::-1]
	list1.insert(0, ele)
	for j in list1:
		print(j, end=' ')


from sys import stdin, stdout
for _ in range(1):
	n = int(stdin.readline())
	a = [0] * (2 * n)
	(l, r) = (1, 2 * n)
	for i in range(n):
		if i & 1 == 0:
			a[i] = l
			a[i + n] = l + 1
			l += 2
		else:
			a[i] = r
			a[i + n] = r - 1
			r -= 2
	b = a + a
	sm = 0
	for i in range(n):
		sm += b[i]
	s = {sm}
	for i in range(n, 4 * n):
		sm = sm - b[i - n] + b[i]
		s.add(sm)
	if len(s) <= 2:
		print('YES')
		print(*a)
	else:
		print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
	exit(0)
else:
	print('YES')
	l = [-1] * (2 * n)
	l[0] = 1
	l[-1] = 2 * n
	k = 1
	for i in range(1, n - 1, 2):
		k = k + 3
		l[i] = k
		k = k + 1
		l[i + 1] = k
	k = -1
	for i in range(n, 2 * n - 1, 2):
		k = k + 3
		l[i] = k
		k = k + 1
		l[i + 1] = k
	print(*l)


n = int(input())
a = [1]
b = [2]
for j in range(2, n + 1):
	if a[-1] < b[-1]:
		a.append(2 * j)
		b.append(2 * j - 1)
	else:
		a.append(2 * j - 1)
		b.append(2 * j)
final = a + b
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	print(*a + b, sep=' ')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(1, 2 * n + 1):
		if i % 2 == 0 and i <= n:
			print(2 * i, end=' ')
		elif i % 2 != 0 and i <= n:
			print(2 * i - 1, end=' ')
		elif i % 2 == 0 and i > n:
			print(2 * (i - n), end=' ')
		else:
			print(2 * (i - n) - 1, end=' ')


def almost_equal():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	print('YES')
	for i in range(1, n + 1):
		if i % 2 == 0:
			print(2 * i, end=' ')
		else:
			print(2 * i - 1, end=' ')
	for i in range(1, n + 1):
		if i % 2 != 0:
			print(2 * i, end=' ')
		else:
			print(2 * i - 1, end=' ')
	print('')
almost_equal()


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


N = int(input())
if N % 2 == 1:
	print('YES')
	saida = '1'
	k = 3
	ant = 1
	for i in range(1, N):
		saida += str(' ') + str(ant + k)
		ant += k
		if i % 2 == 1:
			k = 1
		else:
			k = 3
	saida += str(' 2')
	k = 1
	ant = 2
	for i in range(1, N):
		saida += str(' ') + str(ant + k)
		ant += k
		if i % 2 == 0:
			k = 1
		else:
			k = 3
	print(saida)
else:
	print('NO')


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


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
MOD = 1000000007

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
n = Int()
if n % 2 == 0:
	print('NO')
	exit()
ans = [1]
last = 0
for i in range(2, n + 1):
	ans.append(last + 4)
	last = ans[i - 2]
ans[0] = 1
print('YES')
print(*ans, end=' ')
id = 0
for i in range(n):
	if i % 2 == 1:
		a = ans[id] - 1
	else:
		a = ans[id] + 1
	id += 1
	ans.append(a)
	print(a, end=' ')


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


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	ans = [0 for x in range(n * 2)]
	index = 0
	leap = True
	for i in range(1, n * 2 + 1):
		ans[index] = i
		if leap:
			leap = False
			if index > n:
				index -= n
			else:
				index += n
		else:
			leap = True
			index += 1
	print('YES')
	for x in ans:
		print(x, end=' ')


n = eval(input())
ls = [0] * 2 * n
if n % 2 == 0:
	print('NO')
else:
	(ls[0], ls[n]) = (1, 2)
	for i in range(1, n, 2):
		(ls[i], ls[i + n]) = (2 * i + 2, 2 * i + 1)
		(ls[i + 1], ls[i + n + 1]) = (2 * i + 3, 2 * i + 4)
	print('YES')
	for i in ls:
		print(i, end=' ')


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


n = int(input())
if n % 2:
	print('YES')
	ans = [0] * n * 2
	c = 1
	i = -1
	while c <= n * 2:
		i += 1
		ans[i] = c
		i = (i + n) % (2 * n)
		ans[i] = c + 1
		c += 2
	print(*ans)
else:
	print('NO')


n = int(input())
a = [0] * (2 * n)
f = 0
if n % 2:
	print('YES')
	for i in range(1, n + 1):
		(x, y) = (2 * i - 1, 2 * i)
		if f:
			(x, y) = (y, x)
		a[i - 1] = x
		a[i + n - 1] = y
		f ^= 1
	print(*a)
else:
	print('NO')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1
	rr = []
	for _ in range(t):
		n = I()
		if n % 2 == 0:
			rr.append('NO')
		else:
			rr.append('YES')
			a = []
			b = []
			for i in range(n):
				a.append(i * 2 + 1)
				b.append(i * 2 + 2)
				(a, b) = (b, a)
			rr.append(JA(a + b, ' '))
	return JA(rr, '\n')
print(main())


import sys

def input():
	return sys.stdin.readline()[:-1]
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	arr = [0] * (2 * n)
	for i in range(n):
		if i % 2:
			arr[i] = 2 * i + 2
			arr[i + n] = 2 * i + 1
		else:
			arr[i] = 2 * i + 1
			arr[i + n] = 2 * i + 2
	print(*arr)


def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	dn1 = 2 * n + 1
	data = [0] * (2 * n)
	k = (n + 1) / 2
	j = 0
	for i in range(1, n, 2):
		data[j] = i
		data[j + n] = i + 1
		data[j + 1] = dn1 - i
		data[j + n + 1] = dn1 - i - 1
		j += 2
	data[j] = n
	data[j + n] = n + 1
	print('YES')
	print(' '.join(map(str, data)))
main()


n = int(input())
if n % 2 == 1:
	print('YES')
	(a, b) = ([], [])
	for i in range(n):
		x = 2 * i + 1
		y = 2 * i + 2
		if i % 2 == 1:
			(x, y) = (y, x)
		a.append(x)
		b.append(y)
	print(*a, *b)
else:
	print('NO')


x = int(input())
y = 2 * x
outf = [''] * y
if x % 2 == 0:
	print('NO')
	quit()
else:
	for i in range(x):
		if i % 2 == 0:
			outf[i] = str(2 * i + 1)
			outf[x + i] = str(2 * i + 2)
		if i % 2 == 1:
			outf[i] = str(2 * i + 2)
			outf[x + i] = str(2 * i + 1)
print('YES')
print(' '.join(outf))


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


n = int(input())
l = [0 for i in range(2 * n + 1)]
if n % 2 == 0:
	print('NO')
else:
	toggle = True
	for i in range(1, n + 1):
		if toggle:
			l[i] = 2 * i - 1
			l[i + n] = 2 * i
			toggle = False
		else:
			l[i] = 2 * i
			l[i + n] = 2 * i - 1
			toggle = True
	print('YES')
	for i in range(1, 2 * n + 1):
		print(l[i], end=' ')


import sys
import os
from io import IOBase, BytesIO

def main():
	m = int(input())
	n = m * 2
	total = n * (n + 1) // 2
	if total % 2 == 0:
		print('NO')
		return
	total //= 2
	odd = 1
	even = n
	arr = [0] * n
	f = 0
	for i in range(m):
		if f == 0:
			arr[i] = odd
			odd += 2
		else:
			arr[i] = even
			even -= 2
		f = 1 - f
	f = 0
	for i in range(m, n):
		if f == 0:
			curr = total - arr[i - m]
			arr[i] = total + 1 - curr
		else:
			curr = total + 1 - arr[i - m]
			arr[i] = total - curr
		f = 1 - f
	print('YES')
	print(*arr)
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		py2 = round(0.5)
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2 == 1:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline().strip()
main()


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	out = []
	minus = 1
	for i in range(1, n + 1):
		out.append(2 * i - minus)
		if minus == 1:
			minus = 0
		else:
			minus = 1
	minus = 0
	for i in range(1, n + 1):
		out.append(2 * i - minus)
		if minus == 1:
			minus = 0
		else:
			minus = 1
	print('YES')
	out_str = [str(elem) for elem in out]
	print(' '.join(out_str))


import os
import sys
from io import BytesIO, IOBase
from collections import Counter
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
	else:
		print('YES')
		used = [0] * (2 * n + 1)
		ans = [-1] * (2 * n + 1)
		inc = 1
		ind = 1
		for i in range(1, 2 * n + 1):
			if not used[i]:
				if inc:
					if not used[i + 1]:
						ans[ind] = i
						ans[ind + n] = i + 1
						used[i] = 1
						used[i + 1] = 1
						ind += 1
						inc ^= 1
				elif not used[i - 1]:
					ans[ind] = i
					ans[ind + n] = i - 1
					used[i] = 1
					used[i - 1] = 1
					ind += 1
					inc ^= 1
		for i in range(1, 2 * n + 1):
			print(ans[i], end=' ')
	return
main()


def check(arr):
	c = set()
	s = 0
	for i in range(n):
		s += arr[i]
	c.add(s)
	for i in range(n + 1, 2 * n):
		s += arr[i]
		s -= arr[i - n]
		c.add(s)
	c = list(c)
	return len(c) == 2 and abs(c[0] - c[1]) == 1
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	(a, b) = (1, 2)
	p = 0
	ans = [-1] * (2 * n)
	flag = True
	for i in range(n):
		if flag:
			(ans[p], ans[p + n]) = (a, b)
		else:
			(ans[p], ans[p + n]) = (b, a)
		flag = not flag
		(a, b, p) = (a + 2, b + 2, p + 1)
	for i in ans:
		print(i, end=' ')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	s = 2
	m = n + 1
	ans = []
	ct = 0
	for i in range(2 * n + 1):
		ans.append(0)
	ans[1] = 1
	for i in range(2, 2 * n + 1, 2):
		if i == 2 * n:
			ans[m] = i
		elif ct % 2 == 0:
			ans[m] = i
			ans[m + 1] = i + 1
			m += 2
			ct += 1
		else:
			ans[s] = i
			ans[s + 1] = i + 1
			s += 2
			ct += 1
	ans.pop(0)
	print(*ans)


n = int(input())
arr = list()
for i in range(2 * n + 2):
	arr.append(0)
if n % 2 == 0:
	print('NO')
else:
	b = list()
	i = 1
	arr[i] = 1
	c = 2
	b.append(i)
	while i < 2 * n:
		if c % 2 == 0:
			i += 3
			if i < 2 * n:
				b.append(i)
				arr[i] = 1
		else:
			i += 1
			if i < 2 * n:
				b.append(i)
				arr[i] = 1
		c += 1
	for i in range(1, 2 * n + 1):
		if arr[i] != 1:
			b.append(i)
	print('YES')
	print(*b)


n = int(input())
if ~n & 1:
	print('NO')
else:
	print('YES')
	v = [0] * 2 * n
	v[0] = 1
	x = 4
	for i in range(1, n, 2):
		v[i] = x
		v[i + 1] = x + 1
		x += 4
	pin = 0
	for i in range(n, 2 * n):
		if pin == 0:
			v[i] = v[i - n] + 1
		else:
			v[i] = v[i - n] - 1
		pin ^= 1
	for x in v:
		print(x, end=' ')


def problem():
	n = int(input())
	nums = []
	(arr1, arr2) = ([], [])
	if n % 2 == 0:
		print('NO')
	else:
		for i in range(2 * n):
			nums.append(i + 1)
		arr1.append(nums[0])
		toggle = True
		i = 1
		while True:
			if i >= 2 * n - 2:
				break
			if toggle:
				arr2.append(nums[i])
				arr2.append(nums[i + 1])
				toggle = not toggle
			else:
				arr1.append(nums[i])
				arr1.append(nums[i + 1])
				toggle = not toggle
			i += 2
		arr2.append(nums[-1])
		print('YES')
		for i in arr1 + arr2:
			print(i, end=' ')
problem()


from math import ceil
n = int(input())
l1 = []
l2 = []
k = 1
for i in range(1, 2 * n + 1, 2):
	if k % 2 == 1:
		l1.append(i)
		l2.append(i + 1)
	if k % 2 == 0:
		l1.append(i + 1)
		l2.append(i)
	k += 1
if sum(l1[1:]) != sum(l2[1:]):
	print('NO')
else:
	print('YES')
	l = list(l1 + l2)
	print(*l)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	l = [2]
	i = 2
	count = 1
	while i <= 2 * n:
		i += 1
		if i > 2 * n:
			break
		l.append(i)
		i += 3
		if i > 2 * n:
			break
		l.append(i)
	i = 1
	l.append(1)
	while i <= 2 * n:
		i += 3
		if i > 2 * n:
			break
		l.append(i)
		i += 1
		if i > 2 * n:
			break
		l.append(i)
	print(*l)


import math
n = int(input())
result = n * 2 * (n * 2 + 1) / 2
c = result - 3
if c / 2 != int(c / 2):
	print('NO')
if c / 2 == int(c / 2):
	print('YES')
	nums1 = []
	nums2 = []
	i = 1
	j = 0
	m = 2 * n
	while j <= 10 ** 9:
		x = m
		y = x - 1
		if i % 2 == 0:
			nums1.append(x)
			nums2.append(y)
		if i % 2 != 0:
			nums1.append(y)
			nums2.append(x)
		i += 1
		m -= 2
		if m < 2:
			break
		j += 1
	nums = [nums1, nums2]
	nums = sum(nums, [])
	print(*nums)


def solve(n):
	if n == 1:
		print('YES')
		print(1, 2)
		return
	if n % 2 == 0:
		print('NO')
		return
	print('YES')
	print(1, 2 * n, end=' ')
	pos = 1
	prodd = 1
	preven = 2 * n
	for i in range(3, 2 * n + 1):
		if i == 3:
			print(i, end=' ')
			prodd = 3
			continue
		if pos == 1:
			if i % 2 == 1:
				print(prodd + 4, end=' ')
				prodd += 4
			else:
				print(preven - 4, end=' ')
				preven -= 4
				if preven == 2:
					pos = 0
		elif preven == 2:
			if i % 2 == 1:
				print(prodd + 2, end=' ')
				prodd += 2
			else:
				print(preven + 2, end=' ')
				preven += 2
		elif i % 2 == 1:
			print(prodd - 4, end=' ')
			prodd -= 4
		else:
			print(preven + 4, end=' ')
			preven += 4
n = int(input())
solve(n)


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)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	j = 1
	arr = [0] * (2 * n)
	for i in range(n):
		if i % 2 == 0:
			arr[i] = j
			arr[i + n] = j + 1
			j += 3
		else:
			arr[i] = j
			arr[i + n] = j - 1
			j += 1
	print(*arr)


from collections import defaultdict, Counter
import copy, math
from copy import deepcopy
n = int(input())
if n * (2 * n + 1) % 2 == 0:
	print('NO')
else:
	print('YES')
	arr = [0] * (2 * n)
	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)


import sys
lines = sys.stdin.readlines()
n = int(lines[0].strip())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	arr = [0 for _ in range(2 * n)]
	for i in range(n):
		if i % 2 == 0:
			arr[i] = 2 * i + 1
			arr[n + i] = 2 * i + 2
		else:
			arr[i] = 2 * i + 2
			arr[n + i] = 2 * i + 1
	print(' '.join(map(str, arr)))


import sys
n = int(input())
if n % 2 == 0:
	print('NO')
	sys.exit(0)
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())
a = []
for i in range(2 * n):
	a.append(0)
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	a[0] = 1
	pos = 1
	p1 = 1
	p2 = n
	p = 2
	while p <= 2 * n:
		if pos == 1:
			a[p2] = p
			if p < 2 * n:
				a[p2 + 1] = p + 1
			else:
				break
			pos = 0
			p += 2
			p2 += 2
		else:
			a[p1] = p
			if p < 2 * n:
				a[p1 + 1] = p + 1
			else:
				break
			pos = 1
			p += 2
			p1 += 2
	for i in a:
		print(i, end=' ')


n = int(input())
nsum = n * (2 * n + 1) // 2
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	odds = []
	evens = []
	for i in range(n):
		odds.append(2 * i + 1)
		evens.append(2 * i + 2)
	for i in range(n // 2):
		temp = odds[2 * i + 1]
		odds[2 * i + 1] = evens[2 * i + 1]
		evens[2 * i + 1] = temp
	print(' '.join(list(map(str, odds + evens))))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	first = [1]
	second = []
	count = 0
	for i in range(1, n):
		if count % 2 == 0:
			second.append(2 * i)
			second.append(2 * i + 1)
		else:
			first.append(2 * i)
			first.append(2 * i + 1)
		count += 1
	second.append(2 * n)
	for x in first:
		print(x, end=' ')
	for x in second:
		print(x, end=' ')


N = int(input())
if N & 1 == 0:
	print('NO')
else:
	print('YES')
	circle = [None] * (2 * N)
	i = 0
	for j in range(1, N + 1):
		circle[i] = 2 * j - 1
		circle[(i + N) % (2 * N)] = 2 * j
		i = (i + N + 1) % (2 * N)
	print(' '.join(map(str, circle)))


def inp(dtype=str, strip=True):
	s = input()
	res = [dtype(p) for p in s.split()]
	res = res[0] if len(res) == 1 and strip else res
	return res

def problem1():
	n = inp(int)
	a = inp(int, strip=False)
	m = inp(int)
	b = inp(int, strip=False)
	union = set(a + b)
	for k1 in a:
		for k2 in b:
			if k1 + k2 not in union:
				print(k1, k2)
				return

def problem2():
	n = inp(int)
	a = inp(int, strip=False)
	res = 0
	has0 = False
	negs = 0
	for k in a:
		if k < 0:
			negs += 1
		if k == 0:
			has0 = True
			res += 1
		else:
			res += abs(k) - 1
	if negs % 2 == 1 and (not has0):
		res += 2
	print(res)

def problem3():
	n = int(input().strip())
	if n % 2 == 0:
		print('NO')
	else:
		a = [0 for _ in range(2 * n)]
		for i in range(2 * n):
			offset = n if i % 4 in [1, 2] else 0
			pos = offset + i // 2
			a[pos] = i + 1
		print('YES')
		print(' '.join([str(el) for el in a]))

def problem4():
	pass
problem3()


n = int(input())
low = 1
high = 2 * n
arr1 = []
arr2 = []
turn = True
while low < high:
	if turn:
		if low + 1 == high:
			arr1.append(low)
			arr2.append(high)
			break
		else:
			arr1.append(low)
			arr1.append(high)
		turn = False
	else:
		arr2.append(low)
		arr2.append(high)
		turn = True
	low += 1
	high -= 1
arr = arr1 + arr2
if n & 1:
	print('YES')
	for x in arr:
		print(x, end=' ')
else:
	print('NO')


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


n = int(input())
if n % 2:
	print('YES')
	l = [1]
	for i in range(2, 2 * n + 1):
		if i == n + 1:
			l.append(2)
			continue
		if i % 2:
			l.append(l[-1] + 1)
		else:
			l.append(l[-1] + 3)
	print(*l, sep=' ')
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	array = []
	i = 1
	while i <= n:
		if i != n:
			array.append(i)
			array.append(2 * n - i + 1)
		else:
			array.append(i)
		i += 2
	i = 2
	while len(array) < 2 * n:
		array.append(i)
		if len(array) < 2 * n:
			array.append(2 * n - i + 1)
		i += 2
	print('YES')
	print(*array)


import os, io
from sys import stdout
import collections
import random
import math
from operator import itemgetter
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def divisors(n):
	i = 1
	result = []
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
		i += 1
	return result
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	n = 2 * n
	res = [0] * n
	v = 0
	for i in range(0, n // 2, 2):
		res[i] = 2 * v + 1
		v += 1
	v = 0
	for i in range(1, n // 2, 2):
		res[i] = n - 2 * v
		v += 1
	v = 1
	for i in range(n // 2, n, 2):
		res[i] = 2 * v
		v += 1
	v = 1
	for i in range(1 + n // 2, n, 2):
		res[i] = n - 2 * v + 1
		v += 1
	print(' '.join([str(e) for e in res]))


n = int(input())
if n % 2 == 0:
	print('NO')
	raise SystemExit
a = [1]
b = []
i = 2
while i < 2 * n:
	b.append(i)
	b.append(i + 1)
	i += 2
	a.append(i)
	a.append(i + 1)
	i += 2
b.append(2 * n)
a.extend(b)
print('YES')
for i in a:
	print(i, end=' ')
print()


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:
	op = [0] * (2 * n)
	minN = 1
	maxN = 2 * n
	for i in range(n - 1):
		if i % 2 == 0:
			op[i // 2 * 2] = minN
			op[i // 2 * 2 + 1] = maxN
		else:
			op[n + i // 2 * 2] = minN
			op[n + i // 2 * 2 + 1] = maxN
		minN += 1
		maxN -= 1
	op[n - 1] = minN
	op[-1] = maxN
	print('YES')
	print(*op)


from sys import stdin
from math import gcd, sqrt, log10, log2

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())
n = ii()
if n % 2 == 0:
	print('NO')
else:
	a = []
	b = []
	for i in range(1, n + 1):
		if i % 2:
			a.append(i)
			b.append(i + 1)
		else:
			a.append(n * 2 + 2 - i)
			b.append(n * 2 + 2 - i - 1)
	a += b
	print('YES')
	print(*a)


n = int(input())
print('NYOE S'[n % 2::2], *(i % n * 2 + i % 2 + 1 for i in range(n % 2 * 2 * n)))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	arr = [0 for i in range(n)]
	l1 = [1]
	while 1:
		if len(l1) % 2 == 1:
			x = l1[-1]
			poss = x + 3
		else:
			x = l1[-1]
			poss = x + 1
		if poss > 2 * n:
			break
		l1.append(poss)
	l2 = [2]
	while 1:
		if len(l2) % 2 == 1:
			x = l2[-1]
			poss = x + 1
		else:
			x = l2[-1]
			poss = x + 3
		if poss > 2 * n:
			break
		l2.append(poss)
	print('YES')
	for i in l1:
		print(i, end=' ')
	for i in l2:
		print(i, end=' ')
	print()


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	res = [0 for i in range(2 * n)]
	l = 0
	r = 2 * n - 2
	i = 1
	flag = True
	while l <= r:
		if flag:
			res[l] = i
			l += 2
			flag = False
		else:
			res[r] = i
			r -= 2
			flag = True
		i += 2
	i = 2 * n
	l = 1
	r = 2 * n - 1
	flag = False
	while l <= r:
		if flag:
			res[l] = i
			l += 2
			flag = False
		else:
			res[r] = i
			r -= 2
			flag = True
		i -= 2
	print('YES')
	s = ''
	for c in res:
		s += str(c) + ' '
	print(s)


def divisors(M):
	d = []
	i = 1
	while M >= i ** 2:
		if M % i == 0:
			d.append(i)
			if i ** 2 != M:
				d.append(M // i)
		i = i + 1
	return d

def popcount(x):
	x = x - (x >> 1 & 1431655765)
	x = (x & 858993459) + (x >> 2 & 858993459)
	x = x + (x >> 4) & 252645135
	x = x + (x >> 8)
	x = x + (x >> 16)
	return x & 127

def eratosthenes(n):
	res = [0 for i in range(n + 1)]
	prime = set([])
	for i in range(2, n + 1):
		if not res[i]:
			prime.add(i)
			for j in range(1, n // i + 1):
				res[i * j] = 1
	return prime

def factorization(n):
	res = []
	for p in prime:
		if n % p == 0:
			while n % p == 0:
				n //= p
			res.append(p)
	if n != 1:
		res.append(n)
	return res

def euler_phi(n):
	res = n
	for x in range(2, n + 1):
		if x ** 2 > n:
			break
		if n % x == 0:
			res = res // x * (x - 1)
			while n % x == 0:
				n //= x
	if n != 1:
		res = res // n * (n - 1)
	return res

def ind(b, n):
	res = 0
	while n % b == 0:
		res += 1
		n //= b
	return res

def isPrimeMR(n):
	d = n - 1
	d = d // (d & -d)
	L = [2, 3, 5, 7, 11, 13, 17]
	for a in L:
		t = d
		y = pow(a, t, n)
		if y == 1:
			continue
		while y != n - 1:
			y = y * y % n
			if y == 1 or t == n - 1:
				return 0
			t <<= 1
	return 1

def findFactorRho(n):
	from math import gcd
	m = 1 << n.bit_length() // 8
	for c in range(1, 99):
		f = lambda x: (x * x + c) % n
		(y, r, q, g) = (2, 1, 1, 1)
		while g == 1:
			x = y
			for i in range(r):
				y = f(y)
			k = 0
			while k < r and g == 1:
				ys = y
				for i in range(min(m, r - k)):
					y = f(y)
					q = q * abs(x - y) % n
				g = gcd(q, n)
				k += m
			r <<= 1
		if g == n:
			g = 1
			while g == 1:
				ys = f(ys)
				g = gcd(abs(x - ys), n)
		if g < n:
			if isPrimeMR(g):
				return g
			elif isPrimeMR(n // g):
				return n // g
			return findFactorRho(g)

def primeFactor(n):
	i = 2
	ret = {}
	rhoFlg = 0
	while i * i <= n:
		k = 0
		while n % i == 0:
			n //= i
			k += 1
		if k:
			ret[i] = k
		i += 1 + i % 2
		if i == 101 and n >= 2 ** 20:
			while n > 1:
				if isPrimeMR(n):
					(ret[n], n) = (1, 1)
				else:
					rhoFlg = 1
					j = findFactorRho(n)
					k = 0
					while n % j == 0:
						n //= j
						k += 1
					ret[j] = k
	if n > 1:
		ret[n] = 1
	if rhoFlg:
		ret = {x: ret[x] for x in sorted(ret)}
	return ret

def divisors(n):
	res = [1]
	prime = primeFactor(n)
	for p in prime:
		newres = []
		for d in res:
			for j in range(prime[p] + 1):
				newres.append(d * p ** j)
		res = newres
	res.sort()
	return res

def xorfactorial(num):
	if num == 0:
		return 0
	elif num == 1:
		return 1
	elif num == 2:
		return 3
	elif num == 3:
		return 0
	else:
		x = baseorder(num)
		return 2 ** x * ((num - 2 ** x + 1) % 2) + function(num - 2 ** x)

def xorconv(n, X, Y):
	if n == 0:
		res = [X[0] * Y[0] % mod]
		return res
	x = [X[i] + X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	y = [Y[i] + Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	z = [X[i] - X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	w = [Y[i] - Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	res1 = xorconv(n - 1, x, y)
	res2 = xorconv(n - 1, z, w)
	former = [(res1[i] + res2[i]) * inv for i in range(2 ** (n - 1))]
	latter = [(res1[i] - res2[i]) * inv for i in range(2 ** (n - 1))]
	former = list(map(lambda x: x % mod, former))
	latter = list(map(lambda x: x % mod, latter))
	return former + latter

def merge_sort(A, B):
	(pos_A, pos_B) = (0, 0)
	(n, m) = (len(A), len(B))
	res = []
	while pos_A < n and pos_B < m:
		(a, b) = (A[pos_A], B[pos_B])
		if a < b:
			res.append(a)
			pos_A += 1
		else:
			res.append(b)
			pos_B += 1
	res += A[pos_A:]
	res += B[pos_B:]
	return res

class UnionFindVerSize:

	def __init__(self, N):
		self._parent = [n for n in range(0, N)]
		self._size = [1] * N
		self.group = N

	def find_root(self, x):
		if self._parent[x] == x:
			return x
		self._parent[x] = self.find_root(self._parent[x])
		stack = [x]
		while self._parent[stack[-1]] != stack[-1]:
			stack.append(self._parent[stack[-1]])
		for v in stack:
			self._parent[v] = stack[-1]
		return self._parent[x]

	def unite(self, x, y):
		gx = self.find_root(x)
		gy = self.find_root(y)
		if gx == gy:
			return
		self.group -= 1
		if self._size[gx] < self._size[gy]:
			self._parent[gx] = gy
			self._size[gy] += self._size[gx]
		else:
			self._parent[gy] = gx
			self._size[gx] += self._size[gy]

	def get_size(self, x):
		return self._size[self.find_root(x)]

	def is_same_group(self, x, y):
		return self.find_root(x) == self.find_root(y)

class WeightedUnionFind:

	def __init__(self, N):
		self.parent = [i for i in range(N)]
		self.size = [1 for i in range(N)]
		self.val = [0 for i in range(N)]
		self.flag = True
		self.edge = [[] for i in range(N)]

	def dfs(self, v, pv):
		stack = [(v, pv)]
		new_parent = self.parent[pv]
		while stack:
			(v, pv) = stack.pop()
			self.parent[v] = new_parent
			for (nv, w) in self.edge[v]:
				if nv != pv:
					self.val[nv] = self.val[v] + w
					stack.append((nv, v))

	def unite(self, x, y, w):
		if not self.flag:
			return
		if self.parent[x] == self.parent[y]:
			self.flag = self.val[x] - self.val[y] == w
			return
		if self.size[self.parent[x]] > self.size[self.parent[y]]:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[x] += self.size[y]
			self.val[y] = self.val[x] - w
			self.dfs(y, x)
		else:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[y] += self.size[x]
			self.val[x] = self.val[y] + w
			self.dfs(x, y)

class Dijkstra:

	class Edge:

		def __init__(self, _to, _cost):
			self.to = _to
			self.cost = _cost

	def __init__(self, V):
		self.G = [[] for i in range(V)]
		self._E = 0
		self._V = V

	@property
	def E(self):
		return self._E

	@property
	def V(self):
		return self._V

	def add_edge(self, _from, _to, _cost):
		self.G[_from].append(self.Edge(_to, _cost))
		self._E += 1

	def shortest_path(self, s):
		import heapq
		que = []
		d = [10 ** 15] * self.V
		d[s] = 0
		heapq.heappush(que, (0, s))
		while len(que) != 0:
			(cost, v) = heapq.heappop(que)
			if d[v] < cost:
				continue
			for i in range(len(self.G[v])):
				e = self.G[v][i]
				if d[e.to] > d[v] + e.cost:
					d[e.to] = d[v] + e.cost
					heapq.heappush(que, (d[e.to], e.to))
		return d

def Z_algorithm(s):
	N = len(s)
	Z_alg = [0] * N
	Z_alg[0] = N
	i = 1
	j = 0
	while i < N:
		while i + j < N and s[j] == s[i + j]:
			j += 1
		Z_alg[i] = j
		if j == 0:
			i += 1
			continue
		k = 1
		while i + k < N and k + Z_alg[k] < j:
			Z_alg[i + k] = Z_alg[k]
			k += 1
		i += k
		j -= k
	return Z_alg

class BIT:

	def __init__(self, n, mod=0):
		self.BIT = [0] * (n + 1)
		self.num = n
		self.mod = mod

	def query(self, idx):
		res_sum = 0
		mod = self.mod
		while idx > 0:
			res_sum += self.BIT[idx]
			if mod:
				res_sum %= mod
			idx -= idx & -idx
		return res_sum

	def update(self, idx, x):
		mod = self.mod
		while idx <= self.num:
			self.BIT[idx] += x
			if mod:
				self.BIT[idx] %= mod
			idx += idx & -idx
		return

class dancinglink:

	def __init__(self, n, debug=False):
		self.n = n
		self.debug = debug
		self._left = [i - 1 for i in range(n)]
		self._right = [i + 1 for i in range(n)]
		self.exist = [True for i in range(n)]

	def pop(self, k):
		if self.debug:
			assert self.exist[k]
		L = self._left[k]
		R = self._right[k]
		if L != -1:
			if R != self.n:
				(self._right[L], self._left[R]) = (R, L)
			else:
				self._right[L] = self.n
		elif R != self.n:
			self._left[R] = -1
		self.exist[k] = False

	def left(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._left[res]
			if res == -1:
				break
			k -= 1
		return res

	def right(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._right[res]
			if res == self.n:
				break
			k -= 1
		return res

class SparseTable:

	def __init__(self, A, merge_func, ide_ele):
		N = len(A)
		n = N.bit_length()
		self.table = [[ide_ele for i in range(n)] for i in range(N)]
		self.merge_func = merge_func
		for i in range(N):
			self.table[i][0] = A[i]
		for j in range(1, n):
			for i in range(0, N - 2 ** j + 1):
				f = self.table[i][j - 1]
				s = self.table[i + 2 ** (j - 1)][j - 1]
				self.table[i][j] = self.merge_func(f, s)

	def query(self, s, t):
		b = t - s + 1
		m = b.bit_length() - 1
		return self.merge_func(self.table[s][m], self.table[t - 2 ** m + 1][m])

class BinaryTrie:

	class node:

		def __init__(self, val):
			self.left = None
			self.right = None
			self.max = val

	def __init__(self):
		self.root = self.node(-10 ** 15)

	def append(self, key, val):
		pos = self.root
		for i in range(29, -1, -1):
			pos.max = max(pos.max, val)
			if key >> i & 1:
				if pos.right is None:
					pos.right = self.node(val)
					pos = pos.right
				else:
					pos = pos.right
			elif pos.left is None:
				pos.left = self.node(val)
				pos = pos.left
			else:
				pos = pos.left
		pos.max = max(pos.max, val)

	def search(self, M, xor):
		res = -10 ** 15
		pos = self.root
		for i in range(29, -1, -1):
			if pos is None:
				break
			if M >> i & 1:
				if xor >> i & 1:
					if pos.right:
						res = max(res, pos.right.max)
					pos = pos.left
				else:
					if pos.left:
						res = max(res, pos.left.max)
					pos = pos.right
			elif xor >> i & 1:
				pos = pos.right
			else:
				pos = pos.left
		if pos:
			res = max(res, pos.max)
		return res

def solveequation(edge, ans, n, m):
	x = [0] * m
	used = [False] * n
	for v in range(n):
		if used[v]:
			continue
		y = dfs(v)
		if y != 0:
			return False
	return x

	def dfs(v):
		used[v] = True
		r = ans[v]
		for (to, dire, id) in edge[v]:
			if used[to]:
				continue
			y = dfs(to)
			if dire == -1:
				x[id] = y
			else:
				x[id] = -y
			r += y
		return r

class SegmentTree:

	def __init__(self, init_val, segfunc, ide_ele):
		n = len(init_val)
		self.segfunc = segfunc
		self.ide_ele = ide_ele
		self.num = 1 << (n - 1).bit_length()
		self.tree = [ide_ele] * 2 * self.num
		self.size = n
		for i in range(n):
			self.tree[self.num + i] = init_val[i]
		for i in range(self.num - 1, 0, -1):
			self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

	def update(self, k, x):
		k += self.num
		self.tree[k] = x
		while k > 1:
			self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
			k >>= 1

	def query(self, l, r):
		if r == self.size:
			r = self.num
		res = self.ide_ele
		l += self.num
		r += self.num
		while l < r:
			if l & 1:
				res = self.segfunc(res, self.tree[l])
				l += 1
			if r & 1:
				res = self.segfunc(res, self.tree[r - 1])
			l >>= 1
			r >>= 1
		return res

	def bisect_l(self, l, r, x):
		l += self.num
		r += self.num
		Lmin = -1
		Rmin = -1
		while l < r:
			if l & 1:
				if self.tree[l] <= x and Lmin == -1:
					Lmin = l
				l += 1
			if r & 1:
				if self.tree[r - 1] <= x:
					Rmin = r - 1
			l >>= 1
			r >>= 1
		if Lmin != -1:
			pos = Lmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		elif Rmin != -1:
			pos = Rmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		else:
			return -1
import sys, random, bisect
from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
from itertools import permutations
from math import gcd, log
input = lambda : sys.stdin.readline().rstrip()
mi = lambda : map(int, input().split())
li = lambda : list(mi())
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = [0 for i in range(2 * n)]
	for i in range(n):
		if i % 2 == 0:
			ans[i] = 2 * i + 1
			ans[i + n] = 2 * i + 2
		else:
			ans[i] = 2 * i + 2
			ans[i + n] = 2 * i + 1
	print(*ans)


from collections import defaultdict
N = int(input())
if N & 1:
	print('YES')
	Dict = defaultdict(bool)
	Inc = 3
	Num = 1
	List = []
	for i in range(N):
		List.append(Num)
		Dict[Num] = True
		Num += Inc
		Inc = 4 - Inc
	for i in range(1, 2 * N + 1):
		if Dict[i] == False:
			List.append(i)
	print(*List)
else:
	print('NO')


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())
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)


import sys, math, itertools
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
n = inp()
if n % 2 == 0:
	print('NO')
	quit()
res = [0] * (2 * n)
now = 1
res[0] = 1
for i in range(2, 2 * n + 1):
	if i % 2 == 0:
		now += n
		now %= 2 * n
	else:
		now += 1
		now %= 2 * n
	res[now - 1] = i
print('YES')
print(*res)


import sys
input = sys.stdin.readline
from collections import *
n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
print('YES')
ans = [-1] * (2 * n)
now = 1
for i in range(n):
	if i % 2 == 0:
		ans[i] = now
		now += 1
		ans[i + n] = now
		now += 1
	else:
		ans[i + n] = now
		now += 1
		ans[i] = now
		now += 1
print(*ans)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	li = [0] * 2 * n
	j = 0
	k = 1
	for i in range(n):
		li[j] = k
		j = (j + n) % (2 * n)
		li[j] = k + 1
		k += 2
		j += 1
	print('YES')
	print(*li)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	a = [0 for _ in range(2 * n + 1)]
	(s, t) = (True, False)
	for i in range(1, n + 1):
		a[i] = 2 * i - s
		a[i + n] = 2 * i - t
		(s, t) = (t, s)
	print(*a[1:])


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	(l1, l2) = ([], [])
	(l1p, l2p) = (1, 0)
	(ev, od) = (2, 1)
	(l1b, l2b) = (True, False)
	for i in range(1, 2 * n + 1):
		if i % 2:
			if l1b:
				l1.append(od)
				od += 2
			else:
				l1.append(ev)
				ev += 2
			l1b = not l1b
		else:
			if l2b:
				l2.append(od)
				od += 2
			else:
				l2.append(ev)
				ev += 2
			l2b = not l2b
	print(*l1, *l2)


n = int(input())
lst = [0] * (2 * n)
f = 0
lst[0] = 1
ind = 0
for i in range(2, 2 * n + 1):
	if f == 0:
		ind = (ind + n) % (2 * n)
		lst[ind] = i
		f = 1
	else:
		ind -= 1
		lst[ind] = i
		f = 0
diff = [sum(lst[:n])]
s = diff[0]
ind = n - 1
for i in range(2 * n - 1):
	s -= lst[i]
	ind = (ind + 1) % (2 * n)
	s += lst[ind]
	diff.append(s)
if max(diff) - min(diff) <= 1:
	print('YES')
	print(*lst)
else:
	print('NO')


size1 = int(input())
ar1 = []
ar2 = []
count = 1
if size1 % 2 == 0:
	print('NO')
else:
	for i in range(size1):
		if i % 2 == 0:
			ar1.append(count)
			count += 1
			ar2.append(count)
			count += 1
		else:
			ar2.append(count)
			count += 1
			ar1.append(count)
			count += 1
	print('YES')
	ar1 = ar1 + ar2
	for i in ar1:
		print(i, end=' ')
	print()


k = int(input())
if k == 1:
	print('YES')
	print(1, 2)
elif k % 2 == 0:
	print('NO')
else:
	n = 2 * k
	l = [0] * n
	l[0] = 1
	l[k] = 2
	even = n
	odd = 1 + 2
	for t in range(1, k):
		if t % 2 != 0:
			l[t] = even
			even -= 4
		if t % 2 == 0:
			l[t] = odd
			odd += 4
	odd = n - 1
	even = 2 + 2
	for i in range(k + 1, n):
		if i % 2 == 0:
			l[i] = odd
			odd -= 4
		else:
			l[i] = even
			even += 4
	print('YES')
	print(*l, sep=' ')


n = int(input())
if n & 1 == 0:
	print('NO')
elif n == 1:
	print('YES')
	print(1, 2)
else:
	j = [1]
	t = []
	p = 2
	l = 4
	while l < 2 * n or p < 2 * n - 2:
		j.append(l)
		j.append(l + 1)
		l += 4
		t.append(p)
		t.append(p + 1)
		p += 4
	t.append(2 * n)
	print('YES')
	print(*j + t)


t = int(input())
if not t % 2:
	print('NO')
else:
	l1 = [1]
	l2 = [t * 2]
	for i in range(t // 2):
		l1.append(l1[-1] + 3)
		l1.append(l1[-1] + 1)
	for j in range(t // 2):
		l2.append(l2[-1] - 3)
		l2.append(l2[-1] - 1)
	print('YES')
	for i in l1:
		print(i, end=' ')
	for j in range(len(l2) - 1, -1, -1):
		print(l2[j], end=' ')


n = int(input())
a = []
b = []
flag = True
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(1, n + 1):
		if flag:
			flag = False
			a.append(2 * i - 1)
			b.append(2 * i)
		else:
			flag = True
			b.append(2 * i - 1)
			a.append(2 * i)
print(*a + b)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	arr = [0] * (2 * n)
	idx = 1
	for i in range(n):
		arr[i] = idx
		idx += 1
		arr[i + n] = idx
		idx += 1
	for i in range(0, n, 2):
		(arr[i], arr[i + n]) = (arr[i + n], arr[i])
	print('YES')
	print(*arr)


number = int(input())
numbers = [0 for _ in range(2 * number)]
index = 0
currNum = 1
for i in range(number):
	if i % 2 == 0:
		numbers[index] = currNum
		numbers[index + number] = currNum + 1
		index = index + number + 1
	else:
		numbers[index] = currNum
		numbers[index - number] = currNum + 1
		index = index - number + 1
	currNum += 2
indexes = [0, number - 1, 2 * number - 1]
sums = set()
for index in indexes:
	sum = 0
	for j in range(index, index + number):
		sum += numbers[j % (2 * number)]
	sums.add(sum)
if len(sums) == 1 or (len(sums) == 2 and abs(sums.pop() - sums.pop()) == 1):
	print('YES')
	print(' '.join(list(map(str, numbers))))
else:
	print('NO')


n = int(input())
if n & 1:
	print('YES')
	x = [0] * (2 * n + 1)
	l = [n for n in range(1, n + 1)]
	r = [n for n in range(n + 1, 2 * n + 1)]
	e = 1
	for i in range(n):
		b = (i + 1) * 2
		a = (i + 1) * 2 - 1
		if e == 1:
			x[i + 1] = a
			x[n + i + 1] = b
		else:
			x[i + 1] = b
			x[n + i + 1] = a
		e *= -1
	print(*x[1:2 * n + 1])
else:
	print('NO')


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()


import sys
n = int(sys.stdin.readline())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = []
	l = 1
	r = 2 * n
	sid = 1
	while len(ans) < n:
		if sid > 0:
			ans.append(l)
			l += 2
		else:
			ans.append(r)
			r -= 2
		sid = -sid
	l = 2
	r = 2 * n - 1
	sid = 1
	while len(ans) < 2 * n:
		if sid > 0:
			ans.append(l)
			l += 2
		else:
			ans.append(r)
			r -= 2
		sid = -sid
	print(*ans, sep=' ')


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


n = int(input())
n2 = 2 * n
if n == 1:
	print('YES\n1 2')
else:
	a = [None] * n2
	now = n2
	flag = True
	for i in range(n):
		if flag:
			a[i] = now
			a[n + i] = now - 1
		else:
			a[i] = now - 1
			a[n + i] = now
		flag = 1 - flag
		now -= 2
	min_ans = sum(a[:n])
	max_ans = min_ans
	now = min_ans
	for i in range(n2):
		now -= a[i]
		now += a[(n + i) % n2]
		min_ans = min(min_ans, now)
		max_ans = max(max_ans, now)
	if max_ans - min_ans > 1:
		print('NO')
	else:
		print('YES')
		print(' '.join(list(map(str, a))))


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:
	print('YES')
	j = 1
	i = 1
	a = 1
	while a < 2 * n:
		print(i, end=' ')
		a = a + 1
		i = i + 3
		if i > 2 * n:
			i = i - 2 * n
		print(i, end=' ')
		a = a + 1
		i = i + 1
	print()


from sys import stdin
a = int(stdin.readline())
first_half = list()
second_half = list()
if a % 2 == 0:
	print('NO')
if a % 2 == 1:
	print('YES')
	c = 1
	while len(first_half) < a:
		if c % 2 == 1:
			first_half.append(str(c))
			second_half.append(str(c + 1))
			c += 3
		elif c % 2 == 0:
			second_half.append(str(c - 1))
			first_half.append(str(c))
			c += 1
print(' '.join(first_half), ' '.join(second_half))


n = int(input())
a = [0] * (2 * n)
nxt_mn = 1
nxt_mx = 2 * n
c = 0
for i in range(n):
	if c % 2 == 0:
		a[i] = str(nxt_mn)
		a[i + n] = str(nxt_mn + 1)
		nxt_mn += 2
	else:
		a[i] = str(nxt_mx)
		a[i + n] = str(nxt_mx - 1)
		nxt_mx -= 2
	c += 1
if n % 2 == 0:
	print('NO')
else:
	print(f"YES\n{' '.join(a)}")


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


n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
l1 = []
l2 = []
for i in range(2 * n):
	if i % 4 == 0 or i % 4 == 3:
		l1.append(i + 1)
	else:
		l2.append(i + 1)
print('YES')
print(*l1 + l2)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = [0 for i in range(2 * n)]
	a[0] = 1
	a[n] = 2
	i = 2 * n - 1
	j = n - 1
	k = 3
	while j > 0:
		if j % 2 == 0:
			a[j] = k
			k += 1
			a[i] = k
			k += 1
			i -= 1
			j -= 1
		else:
			a[i] = k
			k += 1
			a[j] = k
			k += 1
			i -= 1
			j -= 1
	print('YES')
	print(' '.join((str(x) for x in a)))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = []
	ans1 = []
	for i in range(1, 2 * n + 1):
		if (i + 1) % 4 == 0 or i % 4 == 2:
			ans1.append(i)
		else:
			ans.append(i)
	print(*ans, sep=' ', end=' ')
	print(*ans1, sep=' ')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	ans = [0] * (2 * n)
	i = 0
	j = 1
	ans[i] = j
	while 1:
		i += n
		i = i % (2 * n)
		j += 1
		ans[i] = j
		if i == 2 * n - 1:
			break
		i += 1
		j += 1
		ans[i] = j
	print('YES')
	for i in range(len(ans)):
		print(ans[i], end=' ')


n = int(input())
if n % 2 != 0:
	print('YES')
	count1 = 0
	k1 = 1
	k2 = 2
	list1 = []
	count2 = 1
	list2 = []
	for i in range(0, n):
		count1 += 1
		list1.append(k1)
		if count1 % 2 != 0:
			k1 += 3
		else:
			k1 += 1
	for j in range(0, n):
		count2 += 1
		list2.append(k2)
		if count2 % 2 != 0:
			k2 += 3
		else:
			k2 += 1
	for i in range(0, n):
		print(list1[i], end=' ')
	for j in range(0, n):
		print(list2[j], end=' ')
else:
	print('NO')


N = int(input())
arr = [0] * 2 * N
if N % 2 == 0:
	print('NO')
else:
	print('YES')
	i = 0
	while i < 2 * N:
		arr[i] = i + 1
		if (3 + N + i) % (2 * N) == 0:
			arr[i + 1] = 2 * N
		else:
			arr[i + 1] = (3 + N + i) % (2 * N)
		print(arr[i], arr[i + 1], end=' ')
		i += 2


from sys import stdin
import math
n = int(stdin.readline().rstrip())
if n & 1 == 0:
	print('NO')
else:
	p = 3
	l = [0] * (2 * n)
	for i in range(n):
		q = p / 2
		if i % 2 == 0:
			l[i] = int(math.floor(q))
			l[i + n] = int(math.ceil(q))
		else:
			l[i + n] = int(math.floor(q))
			l[i] = int(math.ceil(q))
		p += 4
	print('YES')
	for i in l:
		print(str(i) + ' ', end='')


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


n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
print('YES')
t = 1
dt = [3, 1]
for i in range(n):
	print(t, end=' ')
	t += dt[i % 2]
t = 2
dt = [1, 3]
for i in range(n):
	print(t, end=' ')
	t += dt[i % 2]
exit()
import sys
n = 1
a = list(range(1, 2 * n + 1))
from itertools import permutations
for x in permutations(a):
	x = x + x
	b = [sum(x[i:i + n]) for i in range(2 * n)]
	if max(b) - min(b) <= 1:
		print(x)


n = int(input())
if n & 1:
	print('YES')
	data = [0] * (2 * n)
	for i in range(n):
		if i & 1:
			data[i + n] = 2 * i + 1
			data[i] = 2 * i + 2
		else:
			data[i] = 2 * i + 1
			data[i + n] = 2 * i + 2
	[print(d) for d in data]
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	z = [1]
	l = [2]
	for i in range(n - 1):
		if i % 2 == 0:
			z += [z[-1] + 3]
		else:
			z += [z[-1] + 1]
	for i in range(n - 1):
		if i % 2 != 0:
			l += [l[-1] + 3]
		else:
			l += [l[-1] + 1]
	c = z + l
	print(*c)


n = int(input())
arr = [-1] * 2 * n
first = 0
second = n
flag = 0
val = 1
for i in range(n):
	if i % 2 == 0:
		arr[first] = val
		arr[second] = val + 1
		val += 2
		first += 1
		second += 1
	else:
		arr[second] = val
		arr[first] = val + 1
		val += 2
		first += 1
		second += 1
arr2 = []
sumx = 0
for i in range(n):
	sumx += arr[i]
arr2.append(sumx)
end = n
for i in range(2 * n):
	sumx -= arr[i]
	sumx += arr[end % (2 * n)]
	end = end + 1
	arr2.append(sumx)
minval = min(arr2)
maxval = max(arr2)
if maxval - minval <= 1:
	print('YES')
	print(*arr)
else:
	print('NO')


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getArr():
	return list(map(int, input().split()))

def getStr():
	return input().strip()
N = getInt()
if N % 2 == 1:
	print('YES')
	a = []
	for i in range(1, N, 2):
		a.append(i)
		a.append(2 * N - i + 1)
	a.append(N)
	for i in range(N):
		if i % 2 == 0:
			a.append(a[i] + 1)
		else:
			a.append(a[i] - 1)
	print(*a)
else:
	print('NO')


from sys import stdin, stdout
from collections import Counter
import math

def rsingle_int():
	return int(stdin.readline().rstrip())

def rmult_int():
	return [int(x) for x in stdin.readline().rstrip().split()]

def rmult_str():
	return stdin.readline().rstrip().split()

def r_str():
	return stdin.readline().rstrip()

def rsingle_char():
	return stdin.read(1)

def main():
	n = rsingle_int()
	if n % 2 == 0:
		print('NO')
	else:
		half1 = []
		half2 = []
		min = 1
		max = 2 * n
		useMin = True
		i = 0
		for j in range(n):
			if useMin:
				half1.append(min + i)
				half2.append(min + i + 1)
			else:
				half1.append(max - i)
				half2.append(max - i - 1)
			useMin = not useMin
			if useMin:
				i += 2
		print('YES')
		print(*half1 + half2)
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
if n % 2 == 1:
	print('YES')
	if n == 1:
		print(*list(range(1, 3)))
	else:
		h1 = [1, 2 * n]
		h2 = [2, 2 * n - 1]
		cv = 0
		for s in range(3, 2 * n - 1, 2):
			if cv % 2 == 0:
				h1.append(s)
				h2.append(s + 1)
			else:
				h1.append(s + 1)
				h2.append(s)
			cv += 1
		ans = h1 + h2
		print(*ans)
else:
	print('NO')


import sys
input = sys.stdin.readline
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	A = [[], []]
	A[0].append('1')
	switch = 1
	i = 2
	while i < n * 2:
		A[switch] += [str(i), str(i + 1)]
		switch = (switch + 1) % 2
		i += 2
	ans = A[0] + A[1] + [str(n * 2)]
	print('YES')
	print(' '.join(ans))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	k = True
	e = 1
	for i in range(n):
		print(e, end=' ')
		if k:
			e += 3
			k = False
		else:
			e += 1
			k = True
	e = 2
	k = False
	for i in range(n):
		print(e, end=' ')
		if k:
			e += 3
			k = False
		else:
			e += 1
			k = True


from sys import stdin
import heapq

def check(arr):
	arr = arr + arr
	myset = set()
	temp = sum(arr[:n])
	myset.add(temp)
	for i in range(1, 2 * n):
		temp -= arr[i]
		temp += arr[i + n]
		myset.add(temp)
	if len(myset) <= 2:
		return True
	else:
		return False
n = int(stdin.readline().strip())
arr = [-1] * (2 * n)
first = 1
second = 2
for i in range(n):
	arr[i] = first
	arr[i + n] = second
	first += 2
	second += 2
	(first, second) = (second, first)
if check(arr):
	print('YES')
	print(*arr)
else:
	print('NO')


import itertools

def makel(n):
	l = [None] * (2 * n)
	cur = 0
	for i in range(n):
		l[cur] = 2 * i + 1
		cur += n
		cur %= n * 2
		l[cur] = 2 * i + 2
		cur += 1
		cur %= n * 2
	return l

def isok(l):
	lena = len(l) // 2
	lenfull = len(l)
	cur = sum(l[:lena])
	can = True
	xx = l + l
	for i in range(lenfull):
		if abs(cur - sum(xx[i:i + lena])) <= 1:
			continue
		can = False
	if can:
		print(l)
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	l = makel(n)
	print(' '.join(map(str, l)))


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
from decimal import *
BUFSIZE = 8192
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	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] = 2 * i + 1
				ans[i + n] = ans[i] + 1
			else:
				ans[i + n] = 2 * i + 1
				ans[i] = ans[i + n] + 1
		print(' '.join([str(x) for x in ans]))
main()


def func(A, n):
	indecies = set(A)
	indecies.remove(-1)
	answer = []
	j = len(A) - 1
	number = n
	for i in range(1, len(A), 2):
		if number == 1:
			indecies.remove(i)
			answer.append(A[i])
			break
		elif number >= 2:
			number -= 2
			answer.append(A[i])
			indecies.remove(i)
			indecies.remove(j)
			answer.append(A[j])
			j -= 2
		else:
			break
	number = n
	summ = 0
	j = len(A) - 2
	for i in range(2, len(A) - 1, 2):
		if number == 1:
			answer.append(A[i])
			break
		elif number >= 2:
			number -= 2
			answer.append(A[i])
			answer.append(A[j])
			j -= 2
		else:
			break
	return answer
n = int(input())
if n == 1:
	print('YES')
	print('1 2')
elif n % 2 == 0:
	print('NO')
else:
	A = [-1]
	for i in range(2 * n):
		A.append(i + 1)
	array = func(A, n)
	max_sum = (2 * n + 1) * n // 2 + 1
	isAnswer = True
	if isAnswer:
		print('YES')
		for i in array:
			print(i, end=' ')


n = int(input())
if n % 2 != 0:
	print('YES')
	lst = [1]
	mst = []
	for x in range(2, 2 * n + 1, 2):
		if x % 4 == 0:
			lst.append(x)
			lst.append(x + 1)
		else:
			mst.append(x)
			mst.append(x + 1)
	print(*lst, *mst[:n])
else:
	print('NO')


import sys, heapq
n = int(sys.stdin.readline())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = [0] * (2 * n)
	ans[0] = 1
	for i in range(1, n):
		if i % 2 == 1:
			ans[i] = ans[i - 1] + 3
		else:
			ans[i] = ans[i - 1] + 1
	for i in range(n, 2 * n):
		if i % 2 == 1:
			ans[i] = ans[i - n] + 1
		else:
			ans[i] = ans[i - n] - 1
	print(' '.join(map(str, ans)))


n = int(input())
a = []
b = []
for i in range(1, 2 * n + 1):
	if i % 4 == 1 or i % 4 == 0:
		a.append(i)
	else:
		b.append(i)
res = a + b
del a, b
s = sum(res[:n])
t = {s}
for i in range(n, 2 * n):
	s = s - res[i - n] + res[i]
	t.add(s)
for i in range(n + 1):
	s = s - res[i - n] + res[i]
	t.add(s)
if len(t) <= 2:
	print('YES')
	print(*res)
else:
	print('NO')


n = int(input())
if n & 1:
	ans = [0] * 2 * n
	pm = 0
	for i in range(n):
		ans[i] = 2 * i + 1 + pm
		ans[i + n] = 2 * i + 2 - pm
		pm = 1 - pm
	print('YES')
	print(*ans)
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	k = n // 2
	nums = [None for i in range(2 * n)]
	print('YES')
	for i in range(k):
		nums[2 * i] = str(4 * i + 1)
		nums[n + 2 * i] = str(4 * i + 2)
		nums[2 * i + 1] = str(4 * i + 4)
		nums[n + 2 * i + 1] = str(4 * i + 3)
	nums[n - 1] = str(2 * n - 1)
	nums[2 * n - 1] = str(2 * n)
	print(' '.join(nums))


n = int(input())
if n % 2 != 0:
	print('YES')
	if n == 1:
		print('1 2')
	else:
		tab = [0 for i in range(n * 2)]
		tab[0] = 1
		tab[n - 1] = 3
		tab[n] = 2
		tab[2 * n - 1] = 4
		leftNum = 6
		rightNum = 10
		for i in range(1, n // 2 + 1):
			tab[i] = leftNum
			tab[i + n] = leftNum + 1 if leftNum % 2 == 1 else leftNum - 1
			if leftNum % 2 == 0:
				leftNum += 1
			else:
				leftNum += 7
		for i in range(n - 2, n // 2, -1):
			tab[i] = rightNum
			tab[i + n] = rightNum + 1 if rightNum % 2 == 1 else rightNum - 1
			if rightNum % 2 == 0:
				rightNum += 1
			else:
				rightNum += 7
		ret = ''
		for num in tab:
			ret += str(num) + ' '
		print(ret)
else:
	print('NO')


n = int(input())
ar = [0 for i in range(2 * n)]
if n == 1:
	print('YES')
	print('1 2')
elif n % 2 == 0:
	print('NO')
else:
	increase = True
	cur_number = 1
	for i in range(1, n + 1):
		if increase:
			ar[i - 1] = cur_number
			ar[i + n - 1] = cur_number + 1
			increase = False
		else:
			ar[i - 1] = cur_number + 1
			ar[i + n - 1] = cur_number
			increase = True
		cur_number += 2
	print('YES')
	print(' '.join(map(str, ar)))


import sys
from collections import defaultdict as dd
from itertools import permutations as pp
from itertools import combinations as cc
from collections import Counter as ccd
from random import randint as rd
from bisect import bisect_left as bl
from heapq import heappush as hpush
from heapq import heappop as hpop
mod = 10 ** 9 + 7

def ri(flag=0):
	if flag == 0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())
n = ri(1)
k = 2 * n
total = k * (k + 1) // 2
if total % 2 == 0:
	print('NO')
else:
	print('YES')
	b1 = []
	b2 = []
	r1 = 0
	r2 = 0
	for i in range(2 * n, 0, -1):
		if r1 > r2:
			b2.append(i)
			r2 += i
		else:
			b1.append(i)
			r1 += i
	ans = []
	b1.sort()
	b2.sort()
	ano = n
	g = b1 + b2
	print(*g)
	temp = []


from sys import stdin
from sys import setrecursionlimit as SRL
SRL(10 ** 7)
rd = stdin.readline
rrd = lambda : map(int, rd().strip().split())
n = int(rd())
if n % 2 == 0:
	print('NO')
	exit(0)
a = [0] * (2 * n)
i = 1
cnt = 0
print('YES')
while i <= 2 * n:
	if cnt % 2:
		a[cnt + n] = i
		a[cnt] = i + 1
	else:
		a[cnt] = i
		a[cnt + n] = i + 1
	i += 2
	cnt += 1
print(*a)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	l_1 = [1]
	l_2 = [2]
	for i in range(1, n):
		l_1.append(l_1[-1] + i % 2 * 3 + abs(i % 2 - 1) * 1)
		l_2.append(l_2[-1] + i % 2 * 1 + abs(i % 2 - 1) * 3)
	final_l = l_1 + l_2
	for x in final_l:
		print(x, end=' ')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = [-1 for i in range(n * 2)]
	num = 1
	i = 0
	while num <= 2 * n:
		a[i] = num
		num += 1
		i = (i + n) % (2 * n)
		a[i] = num
		if a[(i + 1) % (2 * n)] == -1:
			i += 1
		else:
			i -= 1
		num += 1
	print('YES')
	print(*a)


import sys, math, queue
MOD = 998244353
sys.setrecursionlimit(1000000)

def make(n):
	(x, y) = ([], [])
	(s, p) = (1, 2 * n)
	for i in range(n):
		if i % 2 == 0:
			x.append(s)
			y.append(s + 1)
			s += 2
		else:
			x.append(p)
			y.append(p - 1)
			p -= 2
	return x + y
n = int(input())
if n % 2 == 1:
	print('YES')
	print(*make(n))
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = []
	(i, j) = (1, 2 * n)
	while i <= n:
		ans.append(i)
		i += 2
		if len(ans) == n:
			break
		ans.append(j)
		j -= 2
	j = 2
	i = 2 * n - 1
	while i > n:
		ans.append(j)
		j += 2
		ans.append(i)
		i -= 2
	ans.append(j)
	print(*ans)


n = int(input())
if n % 2 == 0:
	print('NO')
	quit()
print('YES')
first = []
second = []
for _ in range(2 * n):
	if _ % 4 == 0 or _ % 4 == 3:
		first.append(_ + 1)
	else:
		second.append(_ + 1)
ans = first + second
for x in ans:
	print(x, end=' ')


import sys
import re
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import nsmallest, nlargest, heapify, heappop, heappush, heapreplace
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd, log10, atan, tan
from bisect import bisect_left, bisect_right

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
if not n & 1:
	print('NO')
	exit()
result = [0] * (2 * n)
result[0] = 1
i = 0
last = 1
while i != 1:
	i = (i + n) % (2 * n)
	last += 1
	result[i] = last
	if i == 1:
		break
	i -= 1
	last += 1
	result[i] = last
print('YES')
print(*result)


n = int(input())
ans = [1]
o = 0
count = 0
if n % 2 == 0:
	print('NO')
	exit()
if n == 1:
	print('YES')
	print(1, 2)
	exit()
for i in range(2 * n - 1):
	if o:
		x = ans[-1] + 1
		if x > 2 * n:
			x = x % (2 * n)
		ans.append(x)
		o = 0
	else:
		x = ans[-1] + 3
		if x > 2 * n:
			x = x % (2 * n)
		ans.append(x)
		o = 1
print('YES')
print(*ans)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	lis = [0] * (2 * (n + 1))
	f = 1
	l = 2 * n
	c = 0
	for i in range(1, n + 1):
		if i % 2 == 1:
			lis[i] = i
			lis[n + i] = i + 1
		else:
			lis[i] = l - c
			lis[n + i] = l - c - 1
			c += 2
	print(*lis[1:-1])


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = [0] * (2 * n)
	a[0] = 1
	a[2 * n - 1] = 2 * n
	i = 1
	j = n
	t = 2
	for k in range(int((n - 1) / 2)):
		for p in range(2):
			a[j] = t
			j += 1
			t += 1
		for p in range(2):
			a[i] = t
			i += 1
			t += 1
	print('YES')
	for i in range(2 * n):
		print(a[i], end=' ')


num = int(input())
if num % 2 == 0:
	print('NO')
else:
	output_array = [1]
	for i in range(0, 2 * num - 2):
		if i % 2 == 0:
			output_array.append((output_array[-1] + 3) % (2 * num))
		else:
			output_array.append((output_array[-1] + 1) % (2 * num))
	print('YES')
	output_array.append(2 * num)
	str_output = []
	for i in output_array:
		str_output.append(str(i))
	print(' '.join(str_output))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	l1 = [k for k in range(1, 2 * n + 1) if k % 4 == 0 or k % 4 == 1]
	l2 = [k for k in range(2 * n + 1) if k % 4 == 2 or k % 4 == 3]
	print('YES')
	print(*l1 + l2)


from math import *
from sys import *
from collections import defaultdict
M = 10 ** 9 + 7

def pow(a, b):
	res = 1
	while b > 0:
		if b & 1:
			res *= a
		a *= a
		b >>= 1
	return res

def powmod(a, b, m):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a *= a
		b >>= 1
	return res

def inv(a, m):
	return powmod(a, m - 2, m)

def factor(n):
	potentional_p = 3
	itog_list = {}
	if n % 2 == 0:
		itog_list[2] = 0
	while n % 2 == 0:
		n = n // 2
		itog_list[2] += 1
	while n - 1:
		if potentional_p > n ** 0.5:
			if n in itog_list:
				itog_list[n] += 1
			else:
				itog_list[n] = 1
			return itog_list
		while n % potentional_p == 0:
			n = n // potentional_p
			if potentional_p in itog_list:
				itog_list[potentional_p] += 1
			else:
				itog_list[potentional_p] = 1
		potentional_p += 2
	return itog_list

def meth(x):
	if x > 1:
		return (x - 1, 1)
	if x == 0:
		return (1, 1)
	if x < -1:
		return (abs(x + 1), -1)
n = int(stdin.readline())
if n % 2 == 0:
	print('NO')
	exit(0)
print('YES')
lft = [1]
rt = []
fl = 0
for i in range(2, 2 * n, 2):
	if fl == 0:
		rt += [i, i + 1]
		fl = 1
	else:
		lft += [i, i + 1]
		fl = 0
print(*lft + rt + [2 * n])


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	sol = [0] * (2 * n)
	sol[0] = 1
	sol[n] = 2
	for i in range(1, n):
		if i % 2:
			sol[n - i] = i * 2 + 1
			sol[-i] = i * 2 + 2
		else:
			sol[-i] = i * 2 + 1
			sol[n - i] = i * 2 + 2
	print('YES')
	print(*sol)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
input = sys.stdin.readline
from collections import defaultdict, deque
n = int(input())
if n % 2 == 0:
	print('NO')
	exit(0)
print('YES')
x = [1]
y = []
cnt = 0
flag = False
for i in range(2, 2 * n + 1):
	if flag == True:
		x.append(i)
		cnt += 1
	else:
		y.append(i)
		cnt += 1
	if cnt == 2:
		cnt = 0
		flag = not flag
print(*x + y)


import os

def f(n):
	if n % 2 == 0:
		return 'NO'
	arr = [2 * n]
	for _ in range(n):
		if _ % 2 == 0:
			arr.append(arr[-1] - n)
		else:
			arr.append(arr[-1] + n)
		if _ != n - 1:
			arr.append(arr[-1] - 1)
	result = [0] * (2 * n)
	for (i, e) in enumerate(arr):
		result[e - 1] = i + 1
	return f"YES\n{''.join((str(e) + ' ' for e in result))}"
if os.environ.get('DEBUG', False):
	print(f'{f(3)} = YES: 1 4 5 2 3 6')
	print(f'{f(4)} = NO')
	print(f'{f(5)} = ...')
	print(f'{f(7)} = ...')
else:
	n = int(input())
	print(f(n))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = [1]
	j = 4
	while True:
		if j <= 2 * n:
			a.append(j)
			j += 1
		else:
			break
		if j <= 2 * n:
			a.append(j)
			j += 3
		else:
			break
	b = []
	for i in range(len(a)):
		if i % 2 == 0:
			b.append(a[i] + 1)
		else:
			b.append(a[i] - 1)
	a += b
	print('YES')
	print(*a)


n = int(input())
lis = [1]
if n % 2 == 1:
	print('YES')
	sum1 = n * (2 * n + 1) // 2
	sum2 = sum1 + 1
	for i in range(n - 1):
		if i % 2 == 0:
			lis.append(lis[i] + 3)
		else:
			lis.append(lis[i] + 1)
	lis.append(2)
	for i in range(n - 1):
		if i % 2 == 0:
			lis.append(lis[i + n] + 1)
		else:
			lis.append(lis[i + n] + 3)
	print(*lis)
else:
	print('NO')


import sys
import math as mt
input = sys.stdin.buffer.readline
t = 1
for __ in range(t):
	n = int(input())
	x = [0] * (2 * n + 1)
	(i, j) = (n, 2 * n)
	cnt = 0
	if n % 2 != 0:
		ch = 1
		ind = 2 * n
		while cnt < 2 * n:
			if ch % 2 == 1:
				x[j] = ind
				x[j - n] = ind - 1
				j -= 1
				i = j - n
				ind -= 2
			else:
				x[i] = ind
				x[i + n] = ind - 1
				ind -= 2
				i -= 1
				j = i + n
			ch += 1
			cnt += 2
		print('YES')
		print(*x[1:])
	else:
		print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
print('YES')
t = 1
dt = [3, 1]
for i in range(n):
	print(t, end=' ')
	t += dt[i % 2]
t = 2
dt = [1, 3]
for i in range(n):
	print(t, end=' ')
	t += dt[i % 2]


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = [0] * (2 * n)
	(i, j, p) = (1, 0, 0)
	while j < n:
		if p == 0:
			a[j] = i
			a[n + j] = i + 1
			j += 1
			p = 1
			i += 2
			continue
		if p == 1:
			a[j] = i + 1
			a[n + j] = i
			p = 0
			j += 1
			i += 2
			continue
	print('YES')
	print(*a, end=' ')


n = int(input())
if n % 2:
	print('YES')
	ans = [0] * (n * 2)
	c = 1
	ind = -1
	while c <= n * 2:
		ind += 1
		ind %= 2 * n
		ans[ind] = c
		c += 1
		if c > n * 2:
			break
		ind += n
		ind %= 2 * n
		ans[ind] = c
		c += 1
	print(*ans)
else:
	print('NO')


n = int(input())
n2 = 2 * n
a = [0] * n2
v = 1
if n % 2 == 0:
	print('NO')
else:
	for i in range(n):
		if (2 * i + 1) % 4 == 1:
			a[i] = 2 * i + 1
			a[i + n] = 2 * i + 2
		else:
			a[i] = 2 * i + 2
			a[i + n] = 2 * i + 1
	print('YES')
	print(*a)


from sys import stdin, stdout

def main():
	N = int(stdin.read().strip())
	S = 2 * N * (2 * N + 1) // 2
	if S % 2 == 0:
		print('NO')
		return
	print('YES')
	plus1 = 0
	for i in range(1, 2 * N + 1, 2):
		stdout.write('{} '.format(i + plus1))
		plus1 = 1 - plus1
	plus1 = 1
	for i in range(1, 2 * N + 1, 2):
		stdout.write('{} '.format(i + plus1))
		plus1 = 1 - plus1
	stdout.write('\n')
main()


n = int(input())
a = [1]
b = []
counter = 2
for i in range(2, 2 * n + 1):
	if counter < 2:
		a.append(i)
	else:
		b.append(i)
	counter = (counter + 1) % 4
c = a + b
sums = []
sum = 0
for i in range(n):
	sum += c[i]
sums.append(sum)
for i in range(len(c) - n):
	sum = sum - c[i] + c[i + n]
	sums.append(sum)
sum = sum - c[len(c) - n] + c[0]
sums.append(sum)
answer = True
comp = sorted(sums)[-1]
for i in sums:
	if abs(i - comp) > 1:
		answer = False
if answer:
	print('YES')
	print(*a, *b)
else:
	print('NO')


from math import ceil, floor
n = int(input())
t = n * (2 * n) * (2 * n + 1) / (4 * n)
a = [0] * (2 * n)
pos = 0
for i in range(1, 1 + 2 * n):
	a[pos] = i
	if i % 2:
		pos = (pos + n) % (2 * n)
	else:
		pos = (pos + 1) % (2 * n)
test = a * 2
ok = True
l = 0
r = n - 1
sm = sum(test[l:r + 1])
if not floor(t) <= sm <= ceil(t):
	ok = False
for i in range(1, n):
	sm -= test[l]
	l += 1
	r += 1
	sm += test[r]
	if not floor(t) <= sm <= ceil(t):
		ok = False
if ok:
	print('YES')
	print(*a)
else:
	print('NO')


n = int(input())
a = []
a.append(1)
f1 = 0
f2 = 0
if n != 1:
	for i in range(1, n):
		if f1 == 0:
			f1 = 1
			f2 = 0
			a.append(a[i - 1] + 3)
		elif f2 == 0:
			f2 = 1
			f1 = 0
			a.append(a[i - 1] + 1)
	f1 = 0
	f2 = 0
	for i in range(n):
		if f1 == 0:
			a.append(a[i] + 1)
			f1 = 1
			f2 = 0
		elif f2 == 0:
			a.append(a[i] - 1)
			f1 = 0
			f2 = 1
	x = sum(a[1:n + 1])
	y = sum(a[n + 1:]) + 1
	if abs(x - y) == 1:
		print('YES')
		for i in range(2 * n):
			print(a[i], end=' ')
	else:
		print('NO')
else:
	print('YES')
	print(1, 2)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	(a1, a2) = ([], [])
	for i in range(n):
		if i % 2 == 0:
			a1.append(2 * i + 1)
			a2.append(2 * i + 2)
		else:
			a2.append(2 * i + 1)
			a1.append(2 * i + 2)
	print(*a1, *a2)


import sys

def main():
	n = int(input())
	if n == 1:
		print('YES')
		print('1 2')
		sys.exit()
	elif n % 2 == 0:
		print('NO')
		sys.exit()
	elif n == 3:
		print('YES')
		print('1 4 5 2 3 6')
	else:
		print('YES')
		print('1 4 5', end='')
		for i in range(int((n - 3) / 2)):
			print(f' {4 * i + 8}', end='')
			print(f' {4 * i + 9}', end='')
		print(' 2 3 6', end='')
		for i in range(int((n - 3) / 2)):
			print(f' {4 * i + 7}', end='')
			print(f' {4 * i + 10}', end='')

def output(somelist):
	output = ''
	for j in somelist:
		output = output + str(j) + ' '
	return output[:-1]
main()


n = int(input())
arr1 = []
arr2 = []
plus = 1

def pr(arr):
	for i in arr:
		print(i, end=' ')
for i in range(1, n + 1):
	if plus:
		arr1.append(2 * (i - 1) + 1)
		arr2.append(2 * (i - 1) + 2)
		plus = 0
	else:
		arr1.append(2 * (i - 1) + 2)
		arr2.append(2 * (i - 1) + 1)
		plus = 1
if n % 2:
	print('YES')
	pr(arr1)
	pr(arr2)
	print()
else:
	print('NO')


from math import *
from sys import *
n = int(stdin.readline())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	x = []
	k = 1
	j = 2 * n
	for i in range(n // 2):
		x.append(k)
		x.append(j)
		k += 2
		j -= 2
	x.append(n)
	k = 2
	j = 2 * n - 1
	for i in range(n // 2):
		x.append(k)
		x.append(j)
		k += 2
		j -= 2
	x.append(n + 1)
	print(*x)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	l = 1
	r = 2 * n
	while True:
		if l < r:
			print(l, end=' ')
		else:
			break
		if l < r - 2:
			print(r, end=' ')
		l += 2
		r -= 2
	l = 2
	r = 2 * n - 1
	while True:
		if l < r:
			print(l, end=' ')
		else:
			break
		if l < r - 2:
			print(r, end=' ')
		l += 2
		r -= 2
	print(l)


n = int(input())
n = 2 * n
temp = []
i = 0
while i < n:
	temp.append(i + 1)
	i += 2
i = 1
while i <= n:
	temp.append(i + 1)
	i += 2
old_n = n // 2
i = 1
while old_n + i < n:
	a = temp[i]
	temp[i] = temp[old_n + i]
	temp[old_n + i] = a
	i += 2
if temp[n - 1] == n:
	print('YES')
	for j in temp:
		print(j, end=' ')
	print()
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	ans = 'NO'
	print(ans)
else:
	ans = 'YES'
	print(ans)
	arr = [0 for _ in range(2 * n)]
	ind = 0
	for i in range(2 * n):
		if i % 2 == 0:
			arr[ind] = i + 1
			ind = (ind + n) % (2 * n)
		else:
			arr[ind] = i + 1
			ind += 1
	nums = ''
	for i in range(2 * n):
		nums += str(arr[i]) + ' '
	print(nums)


import sys
for line in sys.stdin:
	line.rstrip()
	n = int(line)
	if n % 2 == 0:
		print('NO')
	else:
		print('YES')
		l = [1]
		for _ in range((n - 1) // 2):
			l.append(l[-1] + 3)
			l.append(l[-1] + 1)
		l.append(2)
		for _ in range((n - 1) // 2):
			l.append(l[-1] + 1)
			l.append(l[-1] + 3)
		print(' '.join((str(i) for i in l)))


n = int(input())
a = []
b = []
j = 1
for i in range(n):
	if i % 2 == 0:
		b.append(j)
		a.append(j + 1)
	else:
		b.append(j + 1)
		a.append(j)
	j += 2
a = a + b
c = a[1:n]
d = a[n + 1:2 * n]
if sum(c) == sum(d):
	print('YES')
	print(*a)
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	A = [i for i in range(1, 2 * n + 1)]
	smaller = True
	first = []
	second = []
	for i in range(0, len(A), 2):
		if smaller == True:
			first.append(A[i])
			second.append(A[i + 1])
		else:
			first.append(A[i + 1])
			second.append(A[i])
		smaller = not smaller
	result = first + second
	for num in result:
		print(num, end=' ')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	k = 0
	N = 2 * n
	output = [' '] * N
	while k < N:
		output[k] = str(N - k)
		output[(k + n) % n] = str(N - k - 1)
		output[(k + 1 + n) % n] = str(k + 2)
		output[k + 1] = str(k + 1)
		k = k + 2
	print(' '.join(output))


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
import math
from collections import defaultdict
from collections import Counter
n = int(input())
a = [0] * (2 * n)
t = 2 * n - 1
x = 0
for i in range(2 * n):
	a[x] = i + 1
	if i % 2 == 0:
		x += n
	else:
		x += 1
	if x > t:
		x = x - t - 1
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for y in a:
		print(y, end=' ')


N = int(input())
if N % 2 == 1:
	print('YES')
	ans = [0] * (N * 2)
	for i in range(N):
		if i % 2 == 0:
			ans[i] = 2 * i + 1
			ans[N + i] = 2 * i + 2
		else:
			ans[i] = 2 * i + 2
			ans[N + i] = 2 * i + 1
	for i in ans:
		print(i, end=' ')
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
else:
	i = 0
	a = [0] * 2 * n
	s = 0
	l = 0
	l1 = 1
	l2 = 2
	while s < n:
		if s % 2 == 0:
			a[s] = l1
			a[s + n] = l2
		else:
			a[s] = l2
			a[s + n] = l1
		l1 += 2
		l2 += 2
		s += 1
	print('YES')
	print(*a)


n = int(input())
if (2 * n * n + n) % 2 == 0:
	print('NO')
else:
	cnt = 2 * n * n + n - 1
	cnt = cnt // 2
	ansv = []
	v = []
	summ = 1
	for i in range(n):
		ansv.append(summ)
		if i % 2 == 0:
			summ += 3
		else:
			summ += 1
	summ = 2
	for i in range(n, 2 * n):
		ansv.append(summ)
		if i % 2 == 0:
			summ += 3
		else:
			summ += 1
	print('YES')
	print(' '.join(map(str, ansv)))


n = int(input())
if n & 1:
	print('YES')
	a = []
	b = []
	i = 0
	while i < n:
		a.append(i * 2 + 1)
		b.append(i * 2 + 2)
		if i & 1:
			(a[i], b[i]) = (b[i], a[i])
		i += 1
	for number in a:
		print(number, end=' ')
	for number in b:
		print(number, end=' ')
else:
	print('NO')


from fractions import gcd
from datetime import date, timedelta
from heapq import *
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7

def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		exit()
	ans = [0] * (2 * n)
	f = True
	t = 1
	for i in range(n):
		if i % 2 == 0 and f:
			ans[i] = t
			ans[i + n] = t + 1
			t += 2
			f = False
		else:
			ans[i + n] = t
			ans[i] = t + 1
			t += 2
			f = True
	print('YES')
	print(*ans)
main()


n = int(input())
if n * (2 * n + 1) % 2 == 0:
	print('NO')
	exit()
else:
	print('YES')
	ans = []
	seti = set()
	j = 0
	sum = 1
	for i in range(n):
		ans.append(sum)
		if i % 2 == 0:
			sum += 3
		else:
			sum += 1
	sum = 2
	for i in range(n, 2 * n):
		ans.append(sum)
		if i % 2 == 0:
			sum += 3
		else:
			sum += 1
	print(*ans)


def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	else:
		print('YES')
		odds = range(1, 2 * n + 1, 2)
		evens = range(2, 2 * n + 1, 2)
		circle = []
		for ix in range(n):
			circle.append(odds[ix])
			circle.append(evens[(int(n / 2) + 1 + ix) % n])
		print(*circle)
main()


n = int(input())
a = []
b = []
sa = 0
sb = 0
n *= 2
f = False
for i in range(n):
	if i % 2 != 0:
		if f:
			a.append(i + 1)
		else:
			b.append(i + 1)
		f = not f
	elif f:
		b.append(i + 1)
	else:
		a.append(i + 1)
for i in a:
	sa += i
for i in b:
	sb += i
if abs(sa - sb) == 1:
	print('YES')
	for i in a:
		print(str(i), end=' ')
	for i in b:
		print(str(i), end=' ')
else:
	print('NO')


n = int(input())
ans1 = []
ans2 = []
for i in range(n):
	if i % 2 == 0:
		ans1.append(2 * i + 1)
		ans2.append(2 * i + 2)
	else:
		ans1.append(2 * i + 2)
		ans2.append(2 * i + 1)
ans = ans1 + ans2
s = set()
x = sum(ans[:n])
s.add(x)
for i in range(2 * n):
	x -= ans[i]
	x += ans[(i + n) % (2 * n)]
	s.add(x)
if len(s) == 2:
	print('YES')
	print(' '.join(map(str, ans)))
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
elif n % 2 != 0:
	f = 2 * n
	a = [0] * f
	d = 1
	a[0] = d
	c = 0
	for i in range(n):
		d = d + 1
		a[(c + n) % f] = d
		c = (c + n) % f
		d = d + 1
		a[(c + 1) % f] = d
		c = (c + 1) % f
	a[0] = a[0] - f
	print('YES')
	print(*a)


n = int(input())
arr = []
for i in range(2 * n):
	arr.append(i + 1)
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	if True:
		i = 0
		c = 1
		while i < 2 * n:
			if c == 1:
				print(arr[i], end=' ')
				i += 3
				c = 0
			else:
				print(arr[i], end=' ')
				i += 1
				c = 1
		c = 0
		i = 1
		while i < 2 * n:
			if c == 1:
				print(arr[i], end=' ')
				i += 3
				c = 0
			else:
				print(arr[i], end=' ')
				i += 1
				c = 1


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = [0] * 2 * n
	p1 = 0
	t = 2 * n
	a[0] = 1
	a[n] = 2
	for i in range(n):
		if p1 == 0:
			a[2 * n - 1 - i] = t
			a[n - i - 1] = t - 1
			p1 = 1
			t = t - 2
		else:
			a[2 * n - 1 - i] = t - 1
			a[n - i - 1] = t
			t = t - 2
			p1 = 0
	print('YES')
	print(*a)


n = int(input())
if n % 2 == 0:
	print('NO')
elif n == 1:
	print('YES')
	print('1 2')
else:
	pi = 1
	np1 = n * 2
	ans = [1]
	for i in range(2 * n - 1):
		if i % 2 != 0:
			pi = pi + 1
			if pi > np1:
				pi -= np1
		else:
			pi = pi + 3
			if pi > np1:
				pi -= np1
		ans.append(pi)
	print('YES')
	print(*ans)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	res = [0] * (2 * n)
	i = 0
	j = n
	start = 1
	mid = 2
	flag = 0
	while i < n:
		if flag == 0:
			res[i] = start
			res[j] = mid
			start += 2
			mid += 2
			flag = 1
		elif flag == 1:
			res[i] = mid
			res[j] = start
			start += 2
			mid += 2
			flag = 0
		i += 1
		j += 1
	print(*res)


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)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	a = [1]
	x = 2
	while x < n * 2:
		a += [x + 2, x + 3]
		x += 4
	a += [2]
	x = 2
	while x < n * 2:
		a += [x + 1, x + 4]
		x += 4
	print(*a)


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)


import sys
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	k = int(input())
	if k % 2 == 0:
		print('NO')
	else:
		print('YES')
		n = 2 * k
		ans = [1] * n
		ans[k] = 2
		if n > 2:
			for i in range(k + 1, n):
				if i % 2 == 0:
					ans[i] = ans[i - 1] + 1
				else:
					ans[i] = ans[i - 1] + 3
			ans[1] = 4
			for i in range(2, k):
				if i % 2 == 0:
					ans[i] = ans[i - 1] + 1
				else:
					ans[i] = ans[i - 1] + 3
		ans = [str(x) for x in ans]
		print(' '.join(ans))
main()


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	n = n * 2
	l1 = []
	l2 = []
	i = 1
	while i < n + 1:
		if i == 1:
			l1.append(i)
			i += 1
		elif i == n:
			l2.append(n)
			i += 1
		elif i % 4 == 0:
			l1.append(i)
			l1.append(i + 1)
			i = i + 2
		else:
			l2.append(i)
			l2.append(i + 1)
			i = i + 2
	l1.extend(l2)
	print(' '.join(map(str, l1)))


def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
	else:
		print('YES')
		currentPair = 0
		offset = 0
		for i in range(2 * n):
			nextVal = 2 * currentPair + offset
			print(nextVal + 1, end='')
			currentPair = (currentPair + 1) % n
			offset = (offset + 1) % 2
			if i != 2 * n - 1:
				print(' ', end='')
		print()
main()


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	res = [0] * (2 * n + 1)
	vis = [0] * 2 * n
	print('YES')
	large_lst = [i * 2 for i in range(1, n + 1)]
	small_lst = [i * 2 - 1 for i in range(1, n + 1)]
	lst_pair = [(i * 2 - 1, i * 2) for i in range(1, n + 1)]
	res[0] = 1
	l = (n - 1) // 2 + 1
	for k in range(1, n + 1):
		if k % 2 == 0:
			res[k] = 2 * k
		else:
			res[k] = 2 * k - 1
	for k in range(n + 1, 2 * n + 1):
		if k % 2 == 1:
			res[k] = res[k - n] - 1
		else:
			res[k] = res[k - n] + 1
	for c in res[1:]:
		print(c, end=' ')


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
l = [0] * (2 * n)
fg = 0
i = 0
j = n
for k in range(1, 2 * n + 1, 2):
	if fg == 0:
		fg = 1
		l[i] = k
		l[j] = k + 1
	else:
		fg = 0
		l[j] = k
		l[i] = k + 1
	i += 1
	j += 1
sm = sum(l[:n])
s = set()
s.add(sm)
i = 0
j = n
while j < 2 * n + 10:
	sm += l[j % (2 * n)] - l[i % (2 * n)]
	i += 1
	j += 1
	s.add(sm)
s = list(s)
if len(s) != 2 or abs(s[1] - s[0]) != 1:
	print('NO')
else:
	print('YES')
	print(*l)


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from math import gcd
from bisect import bisect

def solution():
	t = int(input())
	a = [0] * 2 * t
	if t % 2 == 0:
		print('NO')
	else:
		print('YES')
		for i in range(t):
			if i % 2 == 0:
				a[i] = 2 * i + 1
				a[i + t] = 2 * i + 2
			else:
				a[i] = 2 * i + 2
				a[i + t] = 2 * i + 1
		print(*a)
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
read = lambda : list(map(int, input().strip().split(' ')))
solution()


import math
t = int(input())
l1 = []
l2 = []
l3 = []
l4 = []
for i in range(3, 2 * t + 1, 4):
	l4.append(i)
	l1.append(i + 1)
	l2.append(i + 2)
	l3.append(i + 3)
g = [0] * (2 * t)
g[0] = 1
g[t] = 2
if t % 2 == 0:
	print('NO')
else:
	for i in range(1, t, 2):
		g[i] = str(l1[i // 2])
	for i in range(2, t, 2):
		g[i] = str(l2[(i - 1) // 2])
	for i in range(t + 1, 2 * t, 2):
		g[i] = str(l4[(i - t) // 2])
	for i in range(t + 2, 2 * t, 2):
		g[i] = str(l3[(i - t - 1) // 2])
	print('YES')
	print(' '.join(map(str, g)))


n = int(input())
y = []
l = 1
p = 2
s = 0
k = 0
if n % 2 == 0:
	print('NO')
	s = 1
else:
	while k != 2 * n:
		if k < n:
			if k % 2 == 0:
				y.append(l)
				l = l + 3
				k = k + 1
			else:
				y.append(l)
				l = l + 1
				k = k + 1
		elif k % 2 != 0:
			y.append(p)
			p = p + 1
			k = k + 1
		else:
			y.append(p)
			p = p + 3
			k = k + 1
if s == 0:
	print('YES')
	print(' '.join(map(str, y)))


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=' ')


def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	A = [0] * (2 * n)
	i = 0
	k = 1
	while k < 2 * n:
		A[i] = k
		k += 1
		i = (i + n) % (2 * n)
		A[i] = k
		k += 1
		i -= 1
	print('YES')
	print(*A)
	pass
import sys
input = sys.stdin.readline
main()


from sys import stdin
n = int(stdin.readline().strip())
y = 2 * n * (2 * n + 1)
y = y // 2
if y % 2 == 0:
	print('NO')
	exit(0)
par = []
impar = []
for i in range(1, 2 * n + 1):
	if i % 2 == 0:
		par.append(i)
	else:
		impar.append(i)
t = True
x = 0
y = len(par) - 1
ans = []
sm = 0
for i in range(n):
	if t:
		ans.append(impar[x])
		x += 1
		t = False
	else:
		ans.append(par[y])
		y -= 1
		t = True
sm = sum(ans)
sm1 = sm + 1
aux = sm - ans[0]
t = True
ind = 1
while len(ans) != 2 * n:
	if t:
		ans.append(sm1 - aux)
		t = False
		aux = sm1 - ans[ind]
		ind += 1
	else:
		ans.append(sm - aux)
		t = True
		aux = sm - ans[ind]
		ind += 1
print('YES')
print(*ans)


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


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	first_half = [' '] * n
	second_half = [' '] * n
	answer = [' '] * 2
	n = n * 2
	pointer = 1
	index_first_half = 1
	index_second_half = 0
	first_half[0] = '1'
	for i in range(2, n + 1):
		if pointer == 3 or pointer == 4:
			first_half[index_first_half] = str(i)
			index_first_half += 1
			if pointer == 4:
				pointer = 0
		else:
			second_half[index_second_half] = str(i)
			index_second_half += 1
		pointer += 1
	print('YES')
	answer[0] = ' '.join(first_half)
	answer[1] = ' '.join(second_half)
	print(' '.join(answer))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	l = [i + 1 for i in range(2 * n + 1)]
	print('YES')
	res = [0] * (2 * n)
	is_max = False
	for i in range(n):
		if not is_max:
			res[i] = l[i]
			res[i + n] = l[i + 1]
			is_max = True
		else:
			res[i] = l[-(i + 1)]
			res[i + n] = l[-(i + 2)]
			is_max = False
	print(*res)


N = int(input())
if not N & 1:
	print('NO')
else:
	L = [0] * (2 * N)
	flag = 1
	for i in range(N):
		(num0, num1) = (i * 2 + 1, i * 2 + 2)
		if flag & 1:
			L[i] = num0
			L[i + N] = num1
		else:
			L[i] = num1
			L[i + N] = num0
		flag += 1
	print('YES')
	for i in L:
		print(i, end=' ')


import sys
input = sys.stdin.readline
n = int(input())
if n % 2 == 0:
	print('NO')
	sys.exit()
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')
	arr1 = []
	arr2 = []
	for i in range(3, 2 * n + 1):
		tmp = i % 4
		if tmp == 2 or tmp == 3:
			arr1.append(i)
		else:
			arr2.append(i)
	arr1 = arr1[::-1]
	arr2 = arr2[::-1]
	ans = [1] + arr1 + [2] + arr2
	print(*ans)


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


n = int(input())
if (n - 1) % 2 != 0:
	print('NO')
else:
	list1 = list()
	list2 = list()
	list1.append(1)
	n = 2 * n
	n -= 1
	i = 2
	while n > 0:
		list2.append(i)
		i += 1
		n -= 1
		if n <= 0:
			break
		list2.append(i)
		i += 1
		n -= 1
		if n <= 0:
			break
		list1.append(i)
		i += 1
		n -= 1
		if n <= 0:
			break
		list1.append(i)
		i += 1
		n -= 1
		if n <= 0:
			break
	print('YES')
	print(*list1, *list2)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	arr = [0] * (2 * n)
	j = 0
	k = 0
	k1 = 1
	while j < n:
		if k % 2 == 0:
			arr[j] = k1
			arr[j + n] = k1 + 1
		else:
			arr[j + n] = k1
			arr[j] = k1 + 1
		k1 += 2
		k += 1
		j += 1
	print('YES')
	print(*arr)


def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = [-1 for _ in range(2 * n)]
	incBy1 = False
	x = 1
	for i in range(n):
		ans[i] = x
		if incBy1:
			x += 1
		else:
			x += 3
		incBy1 = not incBy1
	incBy1 = True
	x = 2
	for i in range(n, 2 * n):
		ans[i] = x
		if incBy1:
			x += 1
		else:
			x += 3
		incBy1 = not incBy1
	oneLineArrayPrint(ans)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	l = [0] * (2 * n)
	l[0] = 1
	l[n] = 2
	flag = 0
	num = 3
	for i in range(1, n):
		if flag == 0:
			l[n + i] = num
			num += 1
			l[i] = num
			num += 1
			flag = 1
		else:
			l[i] = num
			num += 1
			l[n + i] = num
			num += 1
			flag = 0
	print('YES')
	print(*l)


import math

def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	print('YES')
	res = [0] * (n * 2)
	for i in range(n):
		if i % 2 == 0:
			res[i] = i * 2 + 1
			res[i + n] = i * 2 + 2
		else:
			res[i + n] = i * 2 + 1
			res[i] = i * 2 + 2
	print(' '.join([str(x) for x in res]))
main()


import sys
n = int(input())
a = [2]
b = [1]
t = 3
if n % 2 == 0:
	print('NO')
	sys.exit()
else:
	print('YES')
for i in range((n - 1) // 2):
	a.append(t)
	b.append(t + 1)
	b.append(t + 2)
	a.append(t + 3)
	t += 4
print(*b, sep=' ', end=' ')
print(*a, sep=' ')


import math
import sys
import collections

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
n = ii()
if n % 2:
	r = []
	for i in range(1, 2 * n + 1):
		t = 2 * i if i <= n else 2 * i - 2 * n
		if i % 2:
			t -= 1
		r.append(t)
	print('YES')
	print(' '.join(map(str, r)))
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	out = 2 * n * [0]
	parita = 0
	for i in range(n):
		if parita == 0:
			out[i] = 2 * i + 1
			out[n + i] = 2 * i + 2
			parita = 1
		else:
			out[i] = 2 * i + 2
			out[n + i] = 2 * i + 1
			parita = 0
	print(*out)


def gns():
	return list(map(int, input().split()))
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	ans = [None] * (2 * n)
	for i in range(n):
		if i % 2 == 0:
			ans[i] = i * 2 + 1
			ans[n + i] = i * 2 + 2
		else:
			ans[i] = i * 2 + 2
			ans[n + i] = i * 2 + 1
	print(' '.join(map(str, ans)))


n = int(input())
a = [0 for i in range(2 * n)]
m = 1
k = 0
f = 1
for i in range(n):
	if f:
		a[i] = m
		m += 1
		a[i + n] = m
		m += 1
	else:
		a[i + n] = m
		m += 1
		a[i] = m
		m += 1
	f = (f + 1) % 2
if abs(sum(a[:n]) - sum(a[n:2 * n])) == 1:
	print('YES')
	for i in a:
		print(i, end=' ')
	print()
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	flag = 0
	i = 1
	answer = [0] * (2 * n)
	for j in range(n):
		if flag == 0:
			answer[j] = i
			answer[j + n] = i + 1
			flag = 1
		else:
			answer[j + n] = i
			answer[j] = i + 1
			flag = 0
		i += 2
	print('YES')
	print(*answer)


import sys
readline = sys.stdin.readline
N = int(readline())
if N & 1:
	print('YES')
	Ans = list(range(1, 1 + 2 * N, 2)) + list(range(2, 1 + 2 * N, 2))
	for i in range(0, N, 2):
		(Ans[i], Ans[i + N]) = (Ans[i + N], Ans[i])
	print(*Ans)
else:
	print('NO')


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


n = int(input())
a = [1]
b = []
i = 2
if n == 1:
	print('YES')
	print('1 2')
if n % 2 == 0:
	print('NO')
elif n >= 3:
	print('YES')
	while i <= n * 2:
		if i % 4 == 0:
			if i < n * 2:
				a.append(i)
				a.append(i + 1)
			elif i == n * 2:
				a.append(i)
			i = i + 2
			continue
		else:
			if i < n * 2:
				b.append(i)
				b.append(i + 1)
			elif i == n * 2:
				b.append(i)
			i = i + 2
			continue
	for j in range(n):
		print(a[j], end=' ')
	for j in range(n):
		print(b[j], 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)


a = int(input())
line = ''
lst1 = []
lst2 = []
if a % 2 == 0:
	print('NO')
	exit()
for i in range(1, a * 2 + 1):
	if i % 4 == 0 or i % 4 == 1:
		lst1.append(i)
	else:
		lst2.append(i)
print('YES')
for i in lst1:
	print(i, end=' ')
for i in lst2:
	print(i, end=' ')


import sys
n = int(input())
n *= 2
s = (n * n + n) // 2
if s % 2 == 0:
	print('NO')
	sys.exit()
print('YES')

def f(i):
	if i % 2 == 0:
		return i
	else:
		return (i + n // 2 + 1) % n
print(*[f(i) + 1 for i in range(n)])


import sys
input = sys.stdin.buffer.readline
from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

def main():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	arr = []
	parity = True
	for i in range(n):
		if parity:
			arr.append(2 * i + 1)
		else:
			arr.append(2 * i + 2)
		parity = not parity
	for i in range(n):
		if parity:
			arr.append(2 * i + 1)
		else:
			arr.append(2 * i + 2)
		parity = not parity
	print('YES')
	print(*arr)
main()


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	(s, d) = ([], [])
	c = 1
	for i in range(1, 2 * n, 2):
		if c:
			d.append(i)
			s.append(i + 1)
			c = 0
		else:
			d.append(i + 1)
			s.append(i)
			c = 1
	if s:
		print('YES\n', *d, *s)
	else:
		print('NO')


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


n = int(input())
if n % 2 == 1:
	print('YES')
	arr = []
	num = 1
	for i in range(n):
		arr.append(num)
		if i % 2 == 0:
			num += 3
		else:
			num += 1
	num = 2
	for i in range(n):
		arr.append(num)
		if i % 2 == 0:
			num += 1
		else:
			num += 3
	result = ''
	for i in arr:
		result += str(i) + ' '
	print(result[:len(result) - 1])
else:
	print('NO')


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


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
n = iinp()
if n % 2:
	print('YES')
	for i in range(0, 2 * n, 4):
		if i == 0:
			print(i + 1, end=' ')
		else:
			print(i, i + 1, end=' ')
	for i in range(2, 2 * n + 1, 4):
		if i == 2 * n:
			print(i, end=' ')
		else:
			print(i, i + 1, end=' ')
	print()
else:
	print('NO')


n = int(input())
left = [1]
right = []
if n % 2 == 0:
	print('NO')
	exit()
else:
	iter_value = 2
	case = 0
	while iter_value < 2 * n + 1:
		if case == 0:
			right.append(iter_value)
		elif case == 1:
			right.append(iter_value)
		elif case == 2:
			left.append(iter_value)
		elif case == 3:
			left.append(iter_value)
		case = case + 1
		case = case % 4
		iter_value = iter_value + 1
op = left + right
print('YES')
print(*op, sep=' ')


n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
total = 2 * n
mid = n + 1
a = [0] * (2 * n + 1)
pos = 1
turn = 1
for i in range(1, 2 * n, 2):
	if turn == 1:
		a[pos] = i
		a[mid] = i + 1
	else:
		a[pos] = i + 1
		a[mid] = i
	mid += 1
	pos += 1
	turn ^= 2
print('YES')
s = ''
for i in range(1, 2 * n + 1):
	s += str(a[i]) + ' '
print(s)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	i = 1
	j = 2 * n
	k = 0
	a = []
	while i <= n + 1:
		a.append(j)
		if j == n + 1:
			break
		a.append(i)
		i += 2
		j += -2
	j = 2 * n - 1
	i = 2
	while i < n:
		a.append(j)
		a.append(i)
		i += 2
		j += -2
	a.append(n)
	print('YES')
	print(*a)


n = int(input())
mass = [0] * (2 * n)
for j in range(2 * n)[::2]:
	i = j + 1
	mass[j] = i
	mass[(j + n) % (2 * n)] = i + 1
if n % 2 == 1:
	print('YES')
	for i in mass[:-1:1]:
		print(i, end=' ')
	print(mass[-1])
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	x = []
	for i in range(n):
		if i % 2 == 0:
			x.append(2 * (i + 1))
		else:
			x.append(1 + i * 2)
	for i in range(n):
		if i % 2 == 0:
			x.append(1 + i * 2)
		else:
			x.append(2 + i * 2)
	print('YES')
	print(*x)


a = int(input())
b = []
if a % 2 == 0:
	print('NO')
else:
	print('YES')
	d = 1
	e = 2
	for x in range(a):
		if x % 2 == 0:
			b.append(d)
			d = d + 3
		else:
			b.append(d)
			d = d + 1
	for x in range(a):
		if x % 2 == 1:
			b.append(e)
			e = e + 3
		else:
			b.append(e)
			e = e + 1
for x in range(len(b)):
	print(b[x], end=' ')


import sys, os, re, datetime
from collections import *
from bisect import *

def mat(v, *dims):

	def submat(i):
		if i == len(dims) - 1:
			return [v for _ in range(dims[-1])]
		return [submat(i + 1) for _ in range(dims[i])]
	return submat(0)
__cin__ = None

def cin():
	global __cin__
	if __cin__ is None:
		__cin__ = iter(input().split(' '))
	try:
		return next(__cin__)
	except StopIteration:
		__cin__ = iter(input().split(' '))
		return next(__cin__)

def iarr(n):
	return [int(cin()) for _ in range(n)]

def farr(n):
	return [float(cin()) for _ in range(n)]

def sarr(n):
	return [cin() for _ in range(n)]

def carr(n):
	return input()

def imat(n, m):
	return [iarr(m) for _ in range(n)]

def fmat(n, m):
	return [farr(m) for _ in range(n)]

def smat(n, m):
	return [sarr(m) for _ in range(n)]

def cmat(n, m):
	return [input() for _ in range(n)]
n = int(cin())
if n % 2 == 0:
	print('NO')
	exit(0)
a = mat(0, 2 * n)
i = 0
v = 1
while i < n:
	a[i] = v
	a[i + n] = v + 1
	if i + n + 1 < 2 * n:
		a[i + n + 1] = v + 2
	if i + 1 < n:
		a[i + 1] = v + 3
	v += 4
	i += 2
print('YES')
for v in a:
	sys.stdout.write(str(v) + ' ')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	n = 2 * n
	a = [0] * n
	i = 0
	j = n // 2
	count = 1
	while i < n // 2:
		a[i] = count
		count += 1
		a[j] = count
		count += 1
		i += 1
		j += 1
		if j < n:
			a[j] = count
			count += 1
			a[i] = count
			count += 1
			i += 1
			j += 1
	print(' '.join(map(str, a)))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	a = []
	b = []
	a.append(1)
	i = 2
	while i < 2 * n:
		j = 0
		for j in range(2):
			b.append(i)
			i += 1
		j = 0
		for j in range(2):
			a.append(i)
			i += 1
	b.append(2 * n)
	for i in range(len(b)):
		a.append(b[i])
	print('YES')
	for i in range(len(a)):
		print(a[i], end=' ')
	print(' ')


n = int(input())
l1 = [1]
l2 = []
a = 2
cnt = 0
if n % 2:
	while a < 2 * n:
		if cnt % 2:
			l1.append(a)
			l1.append(a + 1)
			a += 2
			cnt += 1
		else:
			l2.append(a)
			l2.append(a + 1)
			a += 2
			cnt += 1
	print('YES')
	print(*l1 + l2 + [2 * n])
else:
	print('NO')


n = int(input())
if n & 1:
	print('YES')
	a = [i + 1 for i in range(n * 2)]
	(b, c) = (n, 2)
	for i in range(n):
		b %= n * 2
		a[b] = c
		c += 2
		b += 2
	print(*a)
else:
	print('NO')


import math, sys
from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	b = []
	c = []
	f = 0
	for i in range(1, 2 * n + 1, 2):
		if f == 0:
			b.append(i)
			c.append(i + 1)
			f = 1
		else:
			c.append(i)
			b.append(i + 1)
			f = 0
	print('YES')
	for i in b:
		print(i, end=' ')
	for k in c:
		print(k, end=' ')


el = int(input())
if el % 2 == 0:
	print('NO')
else:
	ar1 = [1]
	ar2 = [2]
	ch = 0
	for i in range(3, 2 * el + 1):
		if len(ar1) > len(ar2):
			ar2.append(i)
		elif len(ar2) > len(ar1):
			ar1.append(i)
		elif ch == 0:
			ar2.append(i)
			ch = 1
		else:
			ar1.append(i)
			ch = 0
	print('YES')
	print(*ar1, *ar2)


def mp():
	return map(int, input().split())
n = int(input())
el = 1
el2 = 2 * n
i = 0
a = [0] * (2 * n)
while i < n:
	if i % 2 == 0:
		a[i] = el
		a[i + n] = el + 1
		el += 2
	else:
		a[i] = el2
		a[i + n] = el2 - 1
		el2 -= 2
	i += 1
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in a:
		print(i, end=' ')


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)


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())
arr = [0] * n * 2
num_chet = 1
num_nechet = n * 2
for i in range(n):
	if i % 2 == 0:
		arr[i] = num_chet
		arr[i + n] = num_chet + 1
		num_chet += 2
	else:
		arr[i] = num_nechet
		arr[i + n] = num_nechet - 1
		num_nechet -= 2
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(len(arr)):
		print(arr[i], end=' ')


n = int(input())
a = [0] * n
b = [0] * n
x = 1
y = 2
if n % 2 == 1:
	print('YES')
	for i in range(n):
		a[i] = x
		b[i] = y
		if i % 2 == 0:
			x = x + 3
			y = y + 1
		else:
			x = x + 1
			y = y + 3
	for i in range(n):
		print(a[i], end=' ')
	for i in range(n):
		print(b[i], end=' ')
else:
	print('NO')


R = lambda : map(int, input().split())
n = int(input())
L = [0 for i in range(1, 2 * n + 1)]
c = 0
ma = 2 * n
for i in reversed(range(n)):
	if c % 2 == 0:
		L[i + n] = ma
		ma -= 1
		L[i] = ma
		ma -= 1
	else:
		L[i] = ma
		ma -= 1
		L[i + n] = ma
		ma -= 1
	c += 1
A = L.copy()
for i in range(1, 2 * n):
	A[i] += A[i - 1]
f = 1
for i in range(n):
	if i == 0:
		if abs(A[n - 1] - (A[2 * n - 1] - A[n - 1])) > 1:
			f = 0
			break
	elif abs(A[i + n - 1] - A[i - 1] - (A[2 * n - 1] - A[i + n - 1] + A[i - 1])) > 1:
		f = 0
		break
if f:
	print('YES')
	print(*L)
else:
	print('NO')


n = int(input())
a = [0] * (4 * n)
pre = [0] * (4 * n)
now = 1
c = 1
for i in range(n):
	if c == 1:
		a[i] = now
		a[i + n] = now + 1
		a[n + n + i] = now
		a[n + n + i + n] = now + 1
	else:
		a[i] = now + 1
		a[i + n] = now
		a[n + n + i] = now + 1
		a[n + n + i + n] = now
	now += 2
	c *= -1
pre[0] = a[0]
for i in range(1, 4 * n):
	pre[i] = a[i] + pre[i - 1]
l = []
for i in range(2 * n):
	l.append(pre[n + i - 1] - pre[i] + a[i])
if abs(max(l) - min(l)) <= 1:
	print('YES')
	print(*a[:2 * n])
else:
	print('NO')


n = int(input())
if n % 2:
	print('YES')
	r = []
	for i in range(1, 2 * n, 2):
		r.append((i, i + 1) if (i + 1) % 4 else (i + 1, i))
	for i in [0, 1]:
		for e in r:
			print(e[i], end=' ')
else:
	print('NO')


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='')


n = int(input())
a = []
a2 = []
if n % 2 == 0:
	print('NO')
else:
	for i in range(2 * n):
		if i % 4 == 0 or i % 4 == 3:
			a.append(i + 1)
		else:
			a2.append(i + 1)
	print('YES')
	print(*a + a2)


n = int(input())
if n % 2 == 0:
	print('NO')
elif n == 1:
	print('YES')
	print(1, 2)
else:
	sl = []
	sr = []
	s = []
	sl.append(1)
	sl.append(n * 2)
	sr.append(2)
	for i in range(n * 2 - 1, 2, -1):
		s.append(i)
	c = 0
	for i in range(len(s)):
		if c < 2:
			sr.append(s[i])
			c = c + 1
		elif c == 2:
			sl.append(s[i])
			c = c + 1
		elif c == 3:
			sl.append(s[i])
			c = 0
	ss = sl + sr
	print('YES')
	print(' '.join(map(str, ss)))


n = int(input())
lista = [0] * (2 * n)
index = 0
for i in range(2 * n):
	lista[index] = i + 1
	if index % 2 == 0:
		index += n
		if index >= 2 * n:
			index -= 2 * n
		continue
	if index % 2 != 0:
		index -= 1
		if index < 0:
			index = 2 * n - 1 - index
if 0 in lista:
	print('NO')
else:
	print('YES')
	print(*lista)


from sys import setcheckinterval, stdin
setcheckinterval(1000)

def iin():
	return int(stdin.readline())

def lin():
	return list(map(int, stdin.readline().split()))
n = iin()
a = [0 for i in range(2 * n)]
ch = 2 * n
a[0] = ch
ch -= 1
i = 0
n2 = 2 * n
while ch:
	x = (i + n) % n2
	a[x % n2] = ch
	ch -= 1
	i = (x - 1) % n2
	if ch:
		a[i] = ch
		ch -= 1
	else:
		break
aa = [0] + a[:] + a[:]
l = len(aa)
for i in range(1, l):
	aa[i] += aa[i - 1]
sol = set()
for i in range(n, l):
	sol.add(aa[i] - aa[i - n])
if len(sol) > 2:
	print('NO')
else:
	print('YES')
	print(*a)


t = int(input())
if t % 2 == 0:
	print('NO')
else:
	x = t * 2
	l1 = []
	l2 = []
	l2.append(2)
	j = 0
	for i in range(t):
		if i % 2 == 0:
			j = j + 1
			l1.append(j)
		else:
			j = j + 3
			l1.append(j)
	k = 2
	for i in range(2, t + 1):
		if i % 2 == 0:
			k = k + 1
			l2.append(k)
		else:
			k = k + 3
			l2.append(k)
	l3 = l1 + l2
	print('YES')
	print(*l3)


n = int(input())
if n & 1:
	print('YES')
	a = [0] * (2 * n)
	k = 1
	i = 0
	while k < 2 * n:
		a[i] = k
		a[(i + n) % (2 * n)] = k + 1
		k += 2
		i += 2
	print(*a)
else:
	print('NO')


n = int(input())
a = [7, 1]
b = [3, 5]
last = 0
if n % 2:
	print('YES')
	print(1, end=' ')
	i = 2 * n
	while i >= 3:
		print(i, end=' ')
		last = i
		i -= a[i % 2]
	if last == 3:
		i = 6
	else:
		i = 3
	while i <= 2 * n - 3:
		print(i, end=' ')
		i += a[i % 2 - 1]
	print(2, end=' ')
	i = 2 * n - 1
	while i >= 4:
		print(i, end=' ')
		last = i
		i -= b[i % 2]
	if last == 4:
		i = 5
	else:
		i = 4
	while i <= 2 * n - 2:
		print(i, end=' ')
		i += b[i % 2 - 1]
else:
	print('NO')


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	a = []
	for i in range(0, 2 * n, 1):
		a.append(0)
	i = 0
	c = 1
	while c <= 2 * n:
		a[i] = c
		c += 1
		if i % 2 != 0:
			i += 1
		else:
			i += n
			i = i % (2 * n)
	for i in a:
		print(i, end=' ')


def int_multiple():
	return [int(c) for c in input().split()]

def int_single():
	return int(input())

def str_multiple():
	return [c for c in input().split()]

def str_single():
	return input()
n = int_single()
if n % 2 == 0:
	print('NO')
else:
	ls = []
	le = []
	turn_s = True
	small_left_s = True
	small_right_e = True
	res = ''
	for i in range(n):
		if turn_s:
			l = []
			if small_left_s:
				l = [1 + i, 2 * n - i]
				small_left_s = False
			else:
				l = [2 * n - i, 1 + i]
				small_left_s = True
			turn_s = False
			ls.append(l)
		else:
			l = []
			if small_right_e:
				l = [2 * n - i, 1 + i]
				small_right_e = False
			else:
				l = [1 + i, 2 * n - i]
				small_right_e = True
			turn_s = True
			le.append(l)
	for i in range(len(ls)):
		res += str(ls[i][0]) + ' '
	for i in reversed(range(len(le))):
		res += str(le[i][0]) + ' '
	for i in range(len(le)):
		res += str(le[i][1]) + ' '
	for i in reversed(range(len(ls))):
		res += str(ls[i][1]) + ' '
	print('YES')
	print(res[:-1])


n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
(a, b) = ([], [])
for i in range(4, 2 * n, 4):
	a.append(i)
	a.append(i + 1)
for i in range(2, 2 * n, 4):
	b.append(i)
	b.append(i + 1)
print('YES')
print(1, *a, *b, 2 * n, end=' ')


from sys import stdin
input = stdin.readline
n = int(input())
if n % 2 == 0:
	print('NO')
	exit()
else:
	print('YES')
	a = [0] * n
	b = [0] * n
	sa = 1
	sb = 2
	l = n // 2 - 1
	r = n // 2 + 1
	a[n // 2] = 1
	b[n // 2] = 2
	k = 3
	for i in range((n - 1) // 2):
		if sa > sb:
			a[n // 2 + i + 1] = k
			a[n // 2 - i - 1] = k + 2
			b[n // 2 + i + 1] = k + 1
			b[n // 2 - i - 1] = k + 3
			sa += k + k + 2
			sb += k + k + 4
		else:
			a[n // 2 + i + 1] = k + 1
			a[n // 2 - i - 1] = k + 3
			b[n // 2 + i + 1] = k
			b[n // 2 - i - 1] = k + 2
			sa += k + k + 4
			sb += k + k + 2
		k += 4
	print(*a, end=' ')
	print(*b)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	sum_1 = [1]
	sum_2 = []
	for i in range(2, 2 * n):
		if i // 2 % 2 == 1:
			sum_2.append(i)
		else:
			sum_1.append(i)
	sum_2.append(2 * n)
	print('YES')
	print(*sum_1, *sum_2)


a = int(input())

def g(k, n):
	flag = True
	ans = []
	count = 0
	for i in range(k, 2 * n + 1):
		if count == 0 or count == 1:
			ans.append(i)
			count = count + 1
		elif count == 2 or count == 3:
			count = (count + 1) % 4
			continue
	return ans

def f(A):
	if A % 2 == 0:
		print('NO')
		return False
	else:
		ans2 = [1] + g(4, A) + g(2, A)
	print('YES')
	return ans2
temp = f(a)
if temp != False:
	str18 = ''.join((str(e) + ' ' for e in temp))
	print(str18)


n = int(input())
a = list(range(1, 2 * n + 1))
if n % 2 == 0:
	print('NO')
else:
	l = 2 * n
	print('YES')
	b = [0] * l
	i = 0
	j = l - 1
	k = 0
	c = 0
	while c < n:
		if c % 2 == 0:
			b[k] = a[i]
			i += 2
			c += 1
			k += 1
		else:
			b[k] = a[j]
			j -= 2
			c += 1
			k += 1
	c = 0
	i = 1
	j = l - 2
	while c < n:
		if c % 2 == 0:
			b[k] = a[i]
			i += 2
			c += 1
			k += 1
		else:
			b[k] = a[j]
			j -= 2
			c += 1
			k += 1
	print(' '.join((str(xx) for xx in b)))


n = int(input())
a = [-1] * (2 * n)
if n % 2 == 0:
	print('NO')
else:
	v = 1
	u = 2 * n
	i = 0
	while i < n:
		if i % 2 == 0:
			a[i] = v
			a[i + n] = v + 1
			v += 2
		else:
			a[i] = u
			a[i + n] = u - 1
			u -= 2
		i += 1
	print('YES')
	for i in range(2 * n):
		print(a[i], end=' ')


n = int(input())
if not n % 2:
	print('NO')
	exit(0)
print('YES')
a = [0] * (2 * n)
(i, j) = (0, n)
te = 1
curr = 1
while i != n:
	if te:
		a[i] = curr
		curr += 1
		a[j] = curr
		curr += 1
	else:
		a[j] = curr
		curr += 1
		a[i] = curr
		curr += 1
	te = not te
	i += 1
	j += 1
for i in a:
	print(i, end=' ')
print()


n = int(input())
if n % 2:
	print('YES')
	print(1, end=' ')
	j = 4
	while j < 2 * n:
		print(j, end=' ')
		print(j + 1, end=' ')
		j += 4
	j = 2
	while j <= 2 * n - 4:
		print(j, end=' ')
		print(j + 1, end=' ')
		j += 4
	print(2 * n)
else:
	print('NO')


n = int(input())

def make_circle(n):
	if n % 2 == 0:
		return []
	res = [0] * (2 * n)
	increase = True
	for i in range(n):
		if increase:
			res[i] = 2 * i + 1
			res[i + n] = 2 * i + 2
		else:
			res[i] = 2 * i + 2
			res[i + n] = 2 * i + 1
		increase = not increase
	return res
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	print(' '.join([str(x) for x in make_circle(n)]))


n = int(input())
l = [0 for i in range(2 * n)]
(l[0], l[n]) = (1, 2)
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(1, n):
		if i % 2 == 0:
			l[i] = l[i - 1] + 1
		else:
			l[i] = l[i - 1] + 3
	for i in range(n + 1, 2 * n):
		if i % 2 == 0:
			l[i] = l[i - 1] + 1
		else:
			l[i] = l[i - 1] + 3
	s = ''
	for i in range(2 * n - 1):
		s += str(l[i]) + ' '
	s += str(l[2 * n - 1])
	print(s)


def solve():
	arange = int(input())
	if arange % 2 == 0:
		print('NO')
		return
	diapasone = list(range(1, arange * 2 + 1))
	answer = []
	i = 0
	j = len(diapasone) - 1
	while len(answer) < len(diapasone):
		temp_i = i
		temp_j = j
		counter = arange
		while counter > 0:
			answer.append(diapasone[temp_i])
			counter -= 1
			if counter > 0:
				answer.append(diapasone[temp_j])
			counter -= 1
			temp_i += 2
			temp_j -= 2
		i += 1
		j -= 1
	answer_final = ''
	for i in answer:
		answer_final += str(i)
		answer_final += ' '
	print('YES')
	print(answer_final[:-1])
solve()


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


n = int(input())
a = [0 for i in range(2 * n)]
i = 0
while i < n:
	a[i] = i + 1
	i += 2
i = n
b = 2
while i < 2 * n:
	a[i] = b
	i += 2
	b += 2
i = 1
b = 2 * n
while i < n:
	a[i] = b
	i += 2
	b -= 2
i = n + 1
b = 2 * n - 1
while i < 2 * n:
	a[i] = b
	i += 2
	b -= 2
d = [a[0] - a[-n]]
i = 1
while i < 2 * n:
	s = a[i] - a[(i - n) % (2 * n)]
	if s == d[-1]:
		print('NO')
		exit()
	d.append(s)
	i += 1
print('YES')
print(*a)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	arr = [''] * (2 * n)
	i = 0
	j = 1
	while i < n:
		if i % 2 == 0:
			arr[i] = str(j)
			arr[i + n] = str(j + 1)
		else:
			arr[i] = str(j + 1)
			arr[i + n] = str(j)
		j += 2
		i += 1
	print('YES')
	print(' '.join(arr))


n = int(input())
lst = [0] * (2 * n)
f = 0
lst[0] = 1
ind = 0
for i in range(2, 2 * n + 1):
	if f == 0:
		ind = (ind + n) % (2 * n)
		lst[ind] = i
		f = 1
	else:
		ind -= 1
		lst[ind] = i
		f = 0
if n % 2:
	print('YES')
	print(*lst)
else:
	print('NO')


def almost_equal(k):
	if k % 2 == 0:
		print('NO')
	else:
		print('YES')
		for i in range(int((k - 1) / 2)):
			print(str(4 * i + 1) + ' ' + str(4 * i + 4), end=' ')
		print(str(2 * k - 1), end=' ')
		for j in range(int((k - 1) / 2)):
			print(str(4 * j + 2) + ' ' + str(4 * j + 3), end=' ')
		print(str(2 * k))
inputno = int(input())
almost_equal(inputno)


def editor():
	import sys
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve():
	n = int(input())
	if n % 2 == 0:
		print('NO')
		return
	print('YES')
	(add, od, ev) = (3, 1, 2 * n)
	arr = [0] * (2 * n)
	for i in range(n):
		if i % 2 == 0:
			(arr[i], arr[n + i]) = (od, od + 1)
			od += 2
		else:
			(arr[i], arr[i + n]) = (ev, ev - 1)
			ev -= 2
	for x in arr:
		print(int(x), end=' ')
tc = 1
for t in range(tc):
	solve()


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


def almost_equal(n):
	if n % 2 == 0:
		return None
	else:
		r = [1]
		r2 = [2]
		m = 1
		while m < n:
			m += 2
			r += [2 * m, 2 * m - 3]
			r2 += [2 * m - 1, 2 * m - 2]
		return r + r2
n = int(input().strip())
r = almost_equal(n)
if r:
	print('YES')
	print(' '.join([str(x) for x in r]))
else:
	print('NO')


(a, b) = ([], [])
n = int(input())
k = 2 * n
temp = k * (k + 1) / 2
fl = True
if temp % 2 == 0:
	fl = False
if fl:
	j = 0
	flag = True
	for i in range(1, 2 * n + 1):
		if i == 1:
			a.append(i)
		if flag and i != 1:
			b.append(i)
			j += 1
			if j == 2:
				flag = False
		elif not flag:
			a.append(i)
			j -= 1
			if j == 0:
				flag = True
if not fl:
	print('NO')
else:
	print('YES')
	print(*a + b, end=' ')


n = int(input())
x = []
y = []
for i in range(1, 2 * n + 1):
	x.append(0)
x[0] = 1
x[n] = 2
c = n
k = 3
for l in range(3, n + 2):
	c = (c + 1) % (2 * n)
	x[c] = k
	k = k + 1
	c = (c + n) % (2 * n)
	x[c] = k
	k = k + 1
if n % 2 == 1:
	print('YES')
	print(*x)
else:
	print('NO')


q = int(input())
e = []
k = 1
if q % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(q):
		e.append(k)
		k += 3
		if k > 2 * q:
			k = 2 * q - k + 4
		e.append(k)
		k += 1
	print(' '.join(map(str, e)))


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	s1 = ''
	j = 0
	l = []
	for i in range(n // 2 + 1):
		l.append(j + 1)
		j += 2
		l.append(0)
	j = 1
	for i in range(n // 2):
		l[j] = 2 * n - j + 1
		j += 2
	m = []
	j = 1
	for i in l:
		m.append(i + j)
		j = -1 * j
	print(l[0], end=' ')
	m = m[:-1]
	l = l[:-1]
	l = l[::-1]
	m = m[::-1]
	for i in range(n):
		print(m[i], end=' ')
	for i in range(n - 1):
		print(l[i], end=' ')
	print()


from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 10 ** 5 + 10
MOD = 10 ** 9 + 7

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b):
	return abs(a[0] - b[0]) + abs(b[1] - a[1])

def charIN(x=' '):
	return sys.stdin.readline().strip().split(x)

def arrIN(x=' '):
	return list(map(int, sys.stdin.readline().strip().split(x)))

def eld(x, y):
	a = y[0] - x[0]
	b = x[1] - y[1]
	return (a * a + b * b) ** 0.5

def lgcd(a):
	g = a[0]
	for i in range(1, len(a)):
		g = math.gcd(g, a[i])
	return g

def ms(a):
	msf = -MAX
	meh = 0
	st = en = be = 0
	for i in range(len(a)):
		meh += a[i]
		if msf < meh:
			msf = meh
			st = be
			en = i
		if meh < 0:
			meh = 0
			be = i + 1
	return (msf, st, en)

def ncr(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % MOD
		den = den * (i + 1) % MOD
	return num * pow(den, MOD - 2, MOD) % MOD

def flush():
	return sys.stdout.flush()

def fac(n):
	ans = 1
	for i in range(1, n + 1):
		ans *= i
		ans %= MOD
	return ans
n = int(input())
if n % 2 == 0:
	print('NO')
else:
	print('YES')
	x = [1]
	y = []
	f = 1
	i = 2
	while i <= 2 * n:
		if f:
			y.append(i)
			i += 1
			if i > 2 * n:
				break
			y.append(i)
			i += 1
			f = 0
		else:
			x.append(i)
			i += 1
			if i > 2 * n:
				break
			x.append(i)
			i += 1
			f = 1
	print(*x + y)


n = int(input())
ans = list()
for i in range(2 * n):
	ans.append(0)
if n % 2 == 0:
	print('NO')
else:
	for i in range(int(n / 2) + 1):
		ans[2 * i] = 2 * (i + 1) - 1
		ans[2 * i + n] = 2 * (i + 1)
	for i in range(int(n / 2)):
		ans[-2 * (i + 1) % (2 * n)] = 2 * (i + 2 + int(n / 2)) - 1
		ans[(-2 * (i + 1) + n) % (2 * n)] = 2 * (i + 2 + int(n / 2))
	print('YES')
	for m in ans:
		print(m, end=' ')


import sys
n = int(input())
if n & 1 == 0:
	print('NO')
	sys.exit(0)
else:
	print('YES')
l = [0] * 2 * n
j = 0
for i in range(2 * n):
	l[j] = i + 1
	if i & 1 == 0:
		j += n
		if j > len(l):
			j -= len(l)
	else:
		j -= 1
print(*l)


a = int(input())
if a == 1:
	print('YES')
	print('1 2')
	exit()
l = [0] * (2 * a)
l[0] = 1
l[1] = 4
l[a] = 2
l[a + 1] = 3
if a % 2 == 0:
	print('NO')
	exit()
else:
	for i in range(2, a):
		l[i] = l[i - 2] + 4
	for j in range(a + 2, 2 * a):
		l[j] = l[j - 2] + 4
print('YES')
for i in range(2 * a):
	print(l[i], end=' ')


import math
import sys
DEBUG = False

def inp():
	return sys.stdin.readline().rstrip()

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)

def solve(N):
	if N % 2 == 0:
		return None
	ans = [-1] * (2 * N)
	a = 1
	b = 2
	for i in range(N):
		ans[i] = 2 * i + a
		ans[i + N] = 2 * i + b
		(a, b) = (b, a)
	return ans

def main():
	N = int(inp())
	ans = solve(N)
	if ans:
		print('YES')
		print(*ans)
	else:
		print('NO')
main()


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


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(n,) = I()
ans = [0 for i in range(2 * n)]
if n % 2 == 0:
	print('NO')
	exit()
print('YES')
o = 1
ao = 2
e = 2 * n
ae = -2
for i in range(2 * n):
	if i == n:
		e = 2
		ae = 2
		o = 2 * n - 1
		ao = -2
	if i % 2 == 0:
		ans[i] = o
		o += ao
	else:
		ans[i] = e
		e += ae
print(*ans)


n = int(input())
if n % 2 == 0:
	print('NO')
else:
	l = []
	lrev = []
	i = 0
	even = 4
	odd = 1
	while i < n:
		if i % 2 == 0:
			l.append(odd)
			lrev.append(odd + 1)
			odd += 4
		else:
			l.append(even)
			lrev.append(even - 1)
			even += 4
		i += 1
	print('YES')
	print(*l, *lrev)


n = int(input())
if n % 2 == 0:
	print('NO', end='')
else:
	ans = [0] * (2 * n)
	aux = []
	for i in range(1, 2 * n + 1):
		aux.append(i)
	i = 0
	while i < n:
		ans[i] = aux[i]
		ans[i + n] = aux[i + 1]
		i = i + 1
		if i >= n:
			break
		ans[i] = aux.pop()
		ans[i + n] = aux.pop()
		i = i + 1
	print('YES')
	for i in ans:
		print(i, end=' ')


n = int(input())
li = [0 for j in range(2 * n)]
if n % 2 == 1:
	li[0] = 1
	li[n] = 2
	i = n - 1
	while i > 0:
		if i % 2 == 0:
			li[i] = li[i + 1] + 1
		else:
			li[i] = li[i + 1] + 3
		i = i - 1
	for j in range(n + 1, 2 * n):
		li[j] = int(li[j - n] + (-1) ** (j - n))
	ans = 'YES'
	print(ans)
	print(*li)
else:
	print('NO')


N = int(input())

def solve(N):
	if N % 2 == 0:
		return False
	ans = [0] * (2 * N)
	for i in range(N):
		if i % 2:
			ans[i] = 2 * i + 1
			ans[i + N] = 2 * i + 2
		else:
			ans[i + N] = 2 * i + 1
			ans[i] = 2 * i + 2
	return ans
c = solve(N)
if not c:
	print('NO')
else:
	print('YES')
	print(' '.join(map(str, c)))


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