AtCoder Grand Contest 006 - Median Pyramid Easy

We have a pyramid with N steps, built with blocks. The steps are numbered 1 through N from top to bottom. For each 1≤i≤N, step i consists of 2i-1 blocks aligned horizontally. The pyramid is built so that the blocks at the centers of the steps are aligned vertically.

<image>

A pyramid with N=4 steps

Snuke wrote a permutation of (1, 2, ..., 2N-1) into the blocks of step N. Then, he wrote integers into all remaining blocks, under the following rule:

* The integer written into a block b must be equal to the median of the three integers written into the three blocks directly under b, or to the lower left or lower right of b.



<image>

Writing integers into the blocks

Afterwards, he erased all integers written into the blocks. Now, he only remembers that the integer written into the block of step 1 was x.

Construct a permutation of (1, 2, ..., 2N-1) that could have been written into the blocks of step N, or declare that Snuke's memory is incorrect and such a permutation does not exist.

Constraints

* 2≤N≤10^5
* 1≤x≤2N-1

Input

The input is given from Standard Input in the following format:


N x


Output

If no permutation of (1, 2, ..., 2N-1) could have been written into the blocks of step N, print `No`.

Otherwise, print `Yes` in the first line, then print 2N-1 lines in addition.

The i-th of these 2N-1 lines should contain the i-th element of a possible permutation.

Examples

Input

4 4


Output

Yes
1
6
3
7
4
5
2


Input

2 1


Output

No

Source: atcoder | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
import sys
sys.setrecursionlimit(10 ** 8)
ini = lambda : int(sys.stdin.readline())
inm = lambda : map(int, sys.stdin.readline().split())
inl = lambda : list(inm())
ins = lambda : sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print('\x1b[33m', *a, '\x1b[0m', **dict(file=sys.stderr, **kw))
(n, x) = inm()

def solve():
	if x == 1 or x == 2 * n - 1:
		print('No')
		return
	a = [None] * (2 * n - 1)
	m = (2 * n - 1) // 2
	a[m] = x
	a[m - 1] = x - 1
	a[m + 1] = x + 1
	vals = [x - 1, x, x + 1]
	if m + 2 < 2 * n - 1 and x - 2 >= 1:
		a[m + 2] = x - 2
		vals.append(x - 2)
	if m - 2 >= 0 and x + 2 <= 2 * n - 1:
		a[m - 2] = x + 2
		vals.append(x + 2)
	y = 1
	for i in range(2 * n - 1):
		if a[i] is not None:
			continue
		while y in vals:
			y += 1
		a[i] = y
		y += 1
	print('Yes')
	print(*a, sep='\n')
solve()


(N, X) = map(int, input().split())
U = 2 * N - 1
if N == 1:
	print('Yes')
	print(1)
	exit()
if X == 1 or X == U:
	print('No')
	exit()
ans = [-1] * U
ans[N - 1] = X
big = U - X
small = X - 1
Xsmall = X - 1
Xbig = X + 1
if small < big:
	for i in range(small):
		ans[N + i] = Xsmall
		Xsmall -= 1
	for i in range(U):
		if ans[i] == -1:
			ans[i] = Xbig
			Xbig += 1
else:
	for i in range(big):
		ans[N + i] = Xbig
		Xbig += 1
	for i in range(U):
		if ans[i] == -1:
			ans[i] = Xsmall
			Xsmall -= 1
print('Yes')
print(*ans, sep='\n')


(N, x) = map(int, input().split())
if x in (1, 2 * N - 1):
	print('No')
else:
	print('Yes')
	ans = list(range(1, 2 * N))[x - N:] + list(range(1, 2 * N))[:x - N]
	print(*ans, sep='\n')


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float('inf')

def solve(N, x):
	que = deque(list((i for i in range(1, 2 * N) if i != x)))
	ans = deque([x])
	i = 0
	while que:
		a = que.popleft()
		b = que.pop()
		if i % 2 == 0:
			ans.appendleft(a)
			ans.append(b)
		else:
			ans.appendleft(b)
			ans.append(a)
		i += 1
	return ans

def main():
	(N, x) = map(int, input().split())
	if 1 < x < 2 * N - 1:
		print('Yes')
		print(*solve(N, x), sep='\n')
	else:
		print('No')
main()


(N, X) = map(int, input().split())
if X in (1, 2 * N - 1):
	print('No')
	exit()
print('Yes')
if N == 2:
	for i in range(3):
		print(i + 1)
	exit()
ans = [None] * (2 * N - 1)
if X == 2:
	ans[N - 2:N + 2] = [3, 2, 1, 4]
	n = 5
	for i in range(2 * N - 1):
		if ans[i] is not None:
			continue
		ans[i] = n
		n += 1
else:
	ans[N - 2:N + 2] = [X - 1, X, X + 1, X - 2]
	n = X + 2
	for i in range(2 * N - 1):
		if ans[i] is not None:
			continue
		ans[i] = (n - 1) % (2 * N - 1) + 1
		n += 1
for a in ans:
	print(a)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
if N == 2:
	print('Yes')
	for i in [1, 2, 3]:
		print(i)
	exit()
ans = [0] * (2 * N - 1)
(ans[N - 2], ans[N - 1], ans[N]) = (x - 1, x, x + 1)
d = 1
for i in range(2 * N - 1):
	if i in [N - 2, N - 1, N]:
		continue
	if d == x - 1:
		d = x + 2
	ans[i] = d
	d += 1
print('Yes')
for i in ans:
	print(i)


def main():

	def calc(lst):
		now = lst
		while len(now) > 1:
			tmp = []
			for i in range(len(now) - 2):
				ABC = [now[i], now[i + 1], now[i + 2]]
				ABC.sort()
				tmp.append(ABC[1])
			now = tmp
		return now[0]
	(N, x) = map(int, input().split())
	if x == 1 or x == 2 * N - 1:
		print('No')
		return 0
	print('Yes')
	ans = [1 + i for i in range(2 * N - 1)]
	if x < N:
		tmp = N - x + 1
		for i in range((tmp + 1) // 2):
			(ans[N - i - 1], ans[N - tmp + i - 1]) = (ans[N - tmp + i - 1], ans[N - i - 1])
	else:
		tmp = x - N + 1
		for i in range((tmp + 1) // 2):
			(ans[N + i - 1], ans[N + tmp - i - 1]) = (ans[N + tmp - i - 1], ans[N + i - 1])
	print(*ans, sep='\n')
main()


(n, x) = (int(x) for x in input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
if n == 2:
	print('Yes')
	print(1)
	print(2)
	print(3)
	exit()
if x == 2:
	y = [3, 2, 1, 4]
else:
	y = [x - 1, x, x + 1, x - 2]
ANS = []
i = 1
while i < 2 * n:
	if len(ANS) == 2 * n - 1:
		break
	if i in y:
		i += 4
	if len(ANS) == n - 3:
		ANS += y
		if len(ANS) == 2 * n - 1:
			break
	ANS.append(i)
	i += 1
print('Yes')
for ans in ANS:
	print(ans)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
r = [x - 1, x, x + 1]
tmp = list(range(1, x - 1)) + list(range(x + 2, 2 * N))
ans = tmp[:N - 2] + r + tmp[N - 2:]
for a in ans:
	print(a)


(n, x) = map(int, input().split())
if not 2 <= x <= 2 * n - 2:
	print('No')
	exit(0)
print('Yes')
ans = []
if n == 2:
	ans = [1, 2, 3]
else:
	d = [i for i in range(1, 2 * n)]
	ans = [0] * (2 * n - 1)
	v = []
	if x > 2:
		v = [x - 1, x, x + 1, x - 2]
	else:
		v = [x + 2, x, x - 1, x + 3]
	for w in v:
		d.remove(w)
	ans[n - 2:n + 2] = v
	for i in range(2 * n - 1):
		if ans[i] == 0:
			ans[i] = d.pop()
for v in ans:
	print(v)


(N, x) = map(int, input().split())
if x == 1:
	print('No')
elif x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	if N == 2:
		for i in range(1, 4):
			print(i)
	elif x != 2 * N - 2:
		L = []
		M = [x + 2, x - 1, x, x + 1]
		for i in range(1, 2 * N):
			if not i in M:
				L.append(i)
		for j in range(N - 2):
			print(L[j])
		for k in range(4):
			print(M[k])
		for l in range(N - 3):
			print(L[l + N - 2])
	else:
		L = []
		M = [x - 2, x, x + 1, x - 1]
		for i in range(1, 2 * N):
			if not i in M:
				L.append(i)
		for j in range(N - 2):
			print(L[j])
		for k in range(4):
			print(M[k])
		for l in range(N - 3):
			print(L[l + N - 2])


import sys, queue, math, copy, itertools, bisect, collections, heapq

def main():
	sys.setrecursionlimit(10 ** 7)
	INF = 10 ** 18
	MOD = 10 ** 9 + 7
	LI = lambda : [int(x) for x in sys.stdin.readline().split()]
	NI = lambda : int(sys.stdin.readline())
	SI = lambda : sys.stdin.readline().rstrip()
	(N, x) = LI()
	if x == 1 or x == 2 * N - 1:
		print('No')
		return
	ans = [0] * (2 * N - 1)
	ans[N - 2] = x - 1
	ans[N - 1] = x
	ans[N] = x + 1
	j = N + 1
	for i in range(1, 2 * N):
		if i < x - 1 or i > x + 1:
			ans[j] = i
			j += 1
			if j >= 2 * N - 1:
				j = 0
	print('Yes')
	print(*ans, sep='\n')
main()


(n, x) = map(int, input().split())
if n == 2 and x == 2:
	print('Yes', *[1, 2, 3], sep='\n')
	exit()
a = [[] for _ in range(2 * n - 1)]
a[n - 1] = x
f = [0] * 2 * n
f[x] = 1
try:
	if x > 2 * n - 3:
		a[n - 3] = x - 2
		a[n - 2] = x + 1
		a[n] = x - 1
		f[x - 2] = f[x - 1] = f[x + 1] = 1
	else:
		a[n - 3] = x + 2
		a[n - 2] = x - 1
		a[n] = x + 1
		f[x - 1] = f[x + 1] = f[x + 2] = 1
	if f[0]:
		1 / 0
except:
	print('No')
	exit()
i = 0
for (j, v) in enumerate(f[1:], 1):
	if v:
		continue
	while a[i]:
		i += 1
	a[i] = j
print('Yes', *a, sep='\n')


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	if x <= n:
		r = [i for i in range(1, x + n)]
		l = [i for i in range(x + n, 2 * n)]
	else:
		l = [i for i in range(x - n + 1, 2 * n)]
		r = [i for i in range(1, x - n + 1)]
	ans = l + r
	print('Yes')
	for i in range(2 * n - 1):
		print(ans[i])


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	L = [0] * (2 * N - 1)
	flag = False
	if x > N:
		x = 2 * N - x
		flag = True
	for i in range(N - 1, 2 * N - 1):
		L[i] = x + i - N + 1
	for i in range(N - 2, N - x - 1, -1):
		L[i] = x + i - N + 1
	for i in range(N - x - 1, -1, -1):
		L[i] = 2 * N - 1 - i
	if flag:
		for i in range(2 * N - 1):
			L[i] = 2 * N - L[i]
	for l in L:
		print(l)


(N, x) = [int(i) for i in input().split()]
import sys
if x == 1 or x == 2 * N - 1:
	if N != 1:
		print('No')
		sys.exit()
	else:
		print('Yes')
		print(1)
		sys.exit()
smaller = True
if x > N:
	smaller = False
	x = 2 * N - x
ans = list(range(2 * N - 1, N + x - 1, -1)) + list(range(1, N + x))
if not smaller:
	ans = [2 * N - ans[i] for i in range(2 * N - 1)]
print('Yes')
for i in range(2 * N - 1):
	print(ans[i])


(N, x) = map(int, input().split())
if x in [1, 2 * N - 1]:
	print('No')
else:
	print('Yes')
	if N >= x:
		[print(2 * N - 1 - i) for i in range(N - x)]
		[print(i + 1) for i in range(2 * N - 1 - (N - x))]
	else:
		[print(i + 1 + (x - N)) for i in range(2 * N - 1 - (x - N))]
		[print(i + 1) for i in range(x - N)]


(N, X) = map(int, input().split())
if N == 1:
	print('Yes')
	print(1)
	exit()
if X == 1 or X == 2 * N - 1:
	print('No')
	exit()
print('Yes')
if N == X:
	ans = list(range(1, 2 * N))
elif N > X:
	k = N - X
	ans = list(range(2 * N - k, 2 * N)) + list(range(1, 2 * N - k))
else:
	k = X - N
	ans = list(range(k + 1, 2 * N)) + list(range(1, k + 1))
print(*ans, sep='\n')


(n, x) = [int(i) for i in input().split()]
a = [i for i in range(1, 2 * n)]

def swap(a, i, j):
	b = a[i]
	a[i] = a[j]
	a[j] = b
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if x == n:
		pass
	elif x > n:
		swap(a, n - 1, x - 1)
		swap(a, n, 2 * n - 2)
		swap(a, n + 1, 0)
	else:
		swap(a, n - 1, x - 1)
		swap(a, n - 2, 0)
		swap(a, n - 3, 2 * n - 2)
	for i in a:
		print(i)


def main():
	(N, x) = map(int, input().split())
	if 2 <= x < 2 * N - 1:
		print('Yes')
		ans = [0] * (N * 2 - 1)
		for i in range(1, N):
			if i == x:
				ans[i * (-1) ** i + N - 1] = N
			else:
				ans[i * (-1) ** i + N - 1] = i
		for i in range(1, N):
			if N * 2 - i == x:
				ans[i * (-1) ** (i + 1) + N - 1] = N
			else:
				ans[i * (-1) ** (i + 1) + N - 1] = N * 2 - i
		ans[N - 1] = x
		for i in range(0, N * 2 - 1):
			print(ans[i])
	else:
		print('No')
main()


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	ans = [0] * (2 * n - 1)
	if x == 2:
		(ans[n - 3], ans[n - 2], ans[n - 1], ans[n]) = (4, 2, 1, 3)
		t = 5
		for i in range(2 * n - 1):
			if ans[i]:
				continue
			ans[i] = t
			t += 1
	else:
		(ans[n - 3], ans[n - 2], ans[n - 1], ans[n]) = (1, x + 1, x, 2)
		t = 3
		if x <= t <= x + 1:
			t = x + 2
		for i in range(2 * n - 1):
			if ans[i]:
				continue
			ans[i] = t
			t += 1
			if t == x:
				t += 2
	for x in ans:
		print(x)


(n, x) = map(int, input().split())
if 1 < x < 2 * n - 1:
	print('Yes')
	others = list(range(1, x - 1)) + list(range(x + 2, 2 * n))
	for i in range(n - 2):
		print(others[i])
	print(x - 1)
	print(x)
	print(x + 1)
	for i in range(n + 1, 2 * n - 1):
		print(others[i - 3])
else:
	print('No')


(n, x) = map(int, input().split())
if n == 2:
	if x == 2:
		print('Yes', 1, 2, 3, sep='\n')
		exit()
	else:
		print('No')
		exit()
if x == 1 or x == n * 2 - 1:
	print('No')
	exit()
ans = [i for i in range(1, 2 * n)]
for i in range(len(ans)):
	ans[i] = (ans[i] - (n - x + 1)) % (2 * n - 1) + 1
print('Yes', *ans, sep='\n')


(N, x) = list(map(int, input().split()))
M = N * 2 - 1
if x == 1 or x == M:
	print('No')
	exit()
L = [i + 1 for i in range(M)]
n = N - 1
(L[n], L[x - 1]) = (L[x - 1], L[n])
(L[n - 1], L[0]) = (L[0], L[n - 1])
(L[n + 1], L[M - 1]) = (L[M - 1], L[n + 1])
print('Yes')
for i in L:
	print(i)


(N, x) = map(int, input().split())
if x == 2 and N == 2:
	print('Yes')
	print(1)
	print(2)
	print(3)
elif x == 1 or x >= 2 * N - 1:
	print('No')
else:
	print('Yes')
	if x == 2:
		for i in range(5, N + 2):
			print(i)
		p = [4, 2, 1, 3]
		for i in p:
			print(i)
		for i in range(N + 2, 2 * N):
			print(i)
	else:
		a = [i for i in range(1, 2 * N)]
		for i in range(N - 3):
			print(a[x - 4 - i])
		p = [x - 1, x, x + 1, x - 2]
		for i in p:
			print(i)
		for i in range(N - 2):
			print(a[(x + 1 + i) % (2 * N - 1)])


(N, X) = [int(_) for _ in input().split()]
from itertools import permutations

def calc(x):

	def sub(y, debug=0):
		if debug:
			print('D', y)
		while len(y) > 1:
			y = [sorted(y[i:i + 3])[1] for i in range(len(y) - 2)]
			if debug:
				print('D', y)
		return y
	y = sub(x)
	return y[0]
if X == 1 or X == N * 2 - 1:
	print('No')
else:
	print('Yes')
	if X == N * 2 - 2:
		xs = list(range(N - 1, X + 2)) + list(range(1, N - 1))
	else:
		ys = list(range(1, X - 1)) + list(range(X + 3, N * 2))
		xs = ys[:N - 3] + [X + 2, X - 1, X, X + 1] + ys[N - 3:]
	for x in xs:
		print(x)


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		print(1, 2, 3, sep='\n')
		exit()
	if x == 2:
		li = [x + 1, x, x - 1, x + 2]
	else:
		li = [x - 1, x, x + 1, x - 2]
	others = [e for e in range(1, 2 * n) if e not in li]
	ans = others[:n - 2] + li + others[n - 2:]
	print(*ans, sep='\n')


import sys
(n, x) = map(int, input().split())
if x == 1 or x == n * 2 - 1:
	print('No')
	sys.exit()
print('Yes')
if n == 2:
	for i in range(1, 4):
		print(i)
	sys.exit()
if x == 2:
	l = [x + 1, x, x - 1, x + 2]
else:
	l = [x - 1, x, x + 1, x - 2]
L = []
for i in range(1, n * 2):
	if i not in l:
		L.append(i)
for i in range(n - 2):
	print(L[i])
for i in range(4):
	print(l[i])
for i in range(n - 3):
	print(L[i + n - 2])


import sys
INF = float('inf')
MOD = 10 ** 9 + 7

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

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

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

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

def SI():
	return input()

def main():
	(n, x) = LI()
	if x == 1 or x == 2 * n - 1:
		print('No')
		return 0
	print('Yes')
	if n < 3:
		print(*[n for n in range(1, 2 * n)], sep='\n')
		return 1
	tmp = [x - 1, x, x + 1]
	remain = list(set([n for n in range(1, 2 * n)]) - set(tmp))
	k = n - 2
	tmp = remain[:k] + tmp + remain[k:]
	print(*tmp, sep='\n')
	return 1
main()


(n, x) = map(int, input().split())
l = 2 * n - 1
if x == 1 or x == l:
	print('No')
	exit(0)
if n == 2:
	print('Yes\n1\n2\n3')
	exit(0)
ans = list(map(lambda k: (k - n + x) % l + 1, range(l)))
(ans[n - 3], ans[n + 1]) = (ans[n + 1], ans[n - 3])
print('Yes')
for v in ans:
	print(v)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
ans = None
if N == 2:
	ans = [1, 2, 3]
elif x + 2 <= 2 * N - 1:
	ans = list(range(1, x - 1)) + list(range(x + 3, 2 * N))
	ans = ans[:N - 3] + [x + 2, x - 1, x, x + 1] + ans[N - 3:]
else:
	ans = list(range(1, x - 2)) + list(range(x + 2, 2 * N))
	ans = ans[:N - 3] + [x - 2, x + 1, x, x - 1] + ans[N - 3:]
for i in ans:
	print(i)


import sys
sys.setrecursionlimit(2147483647)
INF = float('inf')
MOD = 10 ** 9 + 7
input = lambda : sys.stdin.readline().rstrip()

def resolve():
	(n, x) = map(int, input().split())
	if x != 1 and x != 2 * n - 1:
		print('Yes')
	else:
		print('No')
		return
	if n == 2:
		print(1, 2, 3)
		return
	if x != 2:
		ans = [i for i in range(1, 2 * n) if i not in [x - 2, x - 1, x, x + 1]]
		ans = ans[:n - 2] + [x - 2, x, x + 1, x - 1] + ans[n - 2:]
		print(*ans)
	else:
		ans = [i for i in range(5, 2 * n)]
		ans = ans[:n - 2] + [1, 2, 4, 3] + ans[n - 2:]
		print(*ans)
resolve()


def solve(n, x):
	if x == 1 or x == 2 * n - 1:
		return None
	ans = [0 for _ in range(2 * n - 1)]
	ans[n - 1] = x
	ans[n - 2] = x - 1
	ans[n] = x + 1
	rest = set(range(1, 2 * n)) - {x - 1, x, x + 1}
	for i in range(2 * n - 1):
		if ans[i] == 0:
			ans[i] = rest.pop()
	return ans

def main():
	(n, x) = (int(y) for y in input().split())
	ans = solve(n, x)
	if ans is None:
		print('No')
	else:
		print('Yes')
		print(*ans, sep='\n')
main()


(N, x) = map(int, input().split())
L = 2 * N - 1
if x == 1 or x == L:
	print('No')
else:
	print('Yes')
	P = [0] * L
	P[L // 2] = x - 1
	P[L // 2 - 1] = x
	P[L // 2 + 1] = x - 2
	for i in range(2, N):
		P[L // 2 - i] = (x - i - 1) % L
		P[L // 2 + i] = (x + i - 1) % L
	print('\n'.join([str(p + 1) for p in P]))


(n, x) = map(int, input().split())
print('Yes' if 1 < x < 2 * n - 1 else 'No')
if 1 < x < 2 * n - 1:
	cnt = [i for i in range(2, 2 * n - 1) if i != x]
	ans = cnt[n - 2:] + [1, x, 2 * n - 1] + cnt[:n - 2]
	print(*ans, sep='\n')


(N, x) = map(int, input().split())
if not 1 < x < N * 2 - 1:
	print('No')
	exit()
print('Yes')
A = [i + 1 for i in range(N * 2 - 1)]
(A[N - 1], A[x - 1]) = (A[x - 1], A[N - 1])
if A[N - 1] < A[N - 2]:
	(A[N - 2], A[0]) = (A[0], A[N - 2])
if A[N - 1] > A[N]:
	(A[N], A[-1]) = (A[-1], A[N])
for i in A:
	print(i)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	res = [0] * (2 * N - 1)
	res[N - 2] = 1
	res[N - 1] = x
	res[N] = 2 * N - 1
	k = 1
	for i in range(2 * N - 1):
		if i not in {N - 2, N - 1, N}:
			while k in {1, x, 2 * N - 1}:
				k += 1
			res[i] = k
			k += 1
	print(*res, sep='\n')


(N, x) = map(int, input().split())
if x in [1, 2 * N - 1]:
	print('No')
else:
	print('Yes')
	if N == 2:
		print(*range(1, 4), sep='\n')
	else:
		ans = [0] * (2 * N - 1)
		s = set(range(1, 2 * N))
		if x >= N:
			ans[N - 2] = x - 1
			s.discard(x - 1)
			ans[N - 1] = x
			s.discard(x)
			ans[N] = x + 1
			s.discard(x + 1)
			ans[N + 1] = x - 2
			s.discard(x - 2)
		else:
			ans[N - 2] = x + 1
			s.discard(x + 1)
			ans[N - 1] = x
			s.discard(x)
			ans[N] = x - 1
			s.discard(x - 1)
			ans[N + 1] = x + 2
			s.discard(x + 2)
		for i in range(2 * N - 1):
			if ans[i]:
				continue
			ans[i] = s.pop()
		print(*ans, sep='\n')


(n, x) = (int(_) for _ in input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
print('Yes')
if n == 2:
	print('1 2 3')
	exit()
s = set()
for i in range(1, 2 * n):
	s.add(i)
a = [-1 for i in range(1, 2 * n)]
a[n - 1] = x
if x == 2:
	a[n - 2] = 1
	a[n] = 3
	a[n - 3] = 4
else:
	a[n - 2] = x + 1
	a[n] = x - 1
	a[n - 3] = x - 2
for i in a:
	s.discard(i)
for i in range(len(a)):
	if a[i] == -1:
		a[i] = s.pop()
print(' '.join((str(_) for _ in a)))


import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10 ** 9))
write = lambda x: sys.stdout.write(x + '\n')
(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	if n == 2:
		ans = [1, 2, 3]
	else:
		s = set(range(1, 2 * n))
		ans = [None] * (2 * n - 1)
		if x > 2:
			ans[n - 2] = x - 1
			ans[n - 1] = x
			ans[n] = x + 1
			ans[n + 1] = x - 2
		else:
			ans[n - 2] = x + 1
			ans[n - 1] = x
			ans[n] = x - 1
			ans[n + 1] = x + 2
		for i in range(n - 2, n + 2):
			s.remove(ans[i])
		for i in range(2 * n - 1):
			if ans[i] is None:
				ans[i] = s.pop()
	print('Yes')
	print('\n'.join(map(str, ans)))


(n, x) = map(int, input().split())
if 2 <= x <= 2 * (n - 1):
	print('Yes')
else:
	print('No')
	exit()
if x == n:
	for i in range(1, 2 * n):
		print(i)
elif x < n:
	for i in range(n, x, -1):
		print(i)
	for i in range(1, x + 1):
		print(i)
	for i in range(n + 1, 2 * n):
		print(i)
else:
	for i in range(1, n):
		print(i)
	for i in range(x, 2 * n):
		print(i)
	for i in range(x - 1, n - 1, -1):
		print(i)


(n, x) = [int(i) for i in input().split()]
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
A = [i for i in range(0, 2 * n)]
(A[n], A[x]) = (x, A[n])
i = A.index(x - 1)
(A[n - 1], A[i]) = (A[i], A[n - 1])
i = A.index(x + 1)
(A[n + 1], A[i]) = (A[i], A[n + 1])
print('Yes')
for i in range(1, 2 * n):
	print(A[i])


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	a = list(range(1, 2 * n))
	b = []
	b.append(a.pop(x))
	b.append(a.pop(x - 1))
	b.append(a.pop(x - 2))
	for i in a[:n - 2] + b + a[n - 2:]:
		print(i)


from collections import deque
(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	A = deque([int(i) for i in range(1, 2 * N)])
	Ans = [0 for i in range(2 * N - 1)]
	if x == 2:
		(Ans[N - 2], Ans[N - 1], Ans[N]) = (3, 2, 1)
		A.remove(1)
		A.remove(2)
		A.remove(3)
		for i in range(2 * N - 1):
			if i < N - 2 or i > N:
				Ans[i] = A.popleft()
	else:
		(Ans[N - 2], Ans[N - 1], Ans[N], Ans[N + 1]) = (x - 1, x, x + 1, x - 2)
		A.remove(x - 1)
		A.remove(x)
		A.remove(x + 1)
		A.remove(x - 2)
		for i in range(2 * N - 1):
			if i < N - 2 or i > N + 1:
				Ans[i] = A.popleft()
	print('Yes')
	for a in Ans:
		print(a)


(n, x) = map(int, input().split())
m = 2 * n - 1
if x == 1 or x == m:
	print('No')
	exit()
if n == 2:
	print('Yes')
	for i in [1, 2, 3]:
		print(i)
	exit()
ll = list(range(1, 2 * n))
if x != 2:
	l = [x - 1, x, x + 1, x - 2]
	ll.remove(x - 1)
	ll.remove(x)
	ll.remove(x + 1)
	ll.remove(x - 2)
else:
	l = [x + 1, x, x - 1, x + 2]
	ll.remove(x - 1)
	ll.remove(x)
	ll.remove(x + 1)
	ll.remove(x + 2)
ans = []
for i in range(len(ll)):
	if i == n - 2:
		ans += l
	ans.append(ll[i])
if len(ll) == n - 2:
	ans += l
print('Yes')
for i in ans:
	print(i)


(n, x) = map(int, input().split())
if 1 < x < 2 * n - 1:
	print('Yes')
	if n == 2:
		for i in range(3):
			print(i + 1)
		exit()
	if x != 2:
		ans = [-1 for i in range(2 * n - 1)]
		k = (n * 2 - 1) // 2
		ans[k - 1] = x - 1
		ans[k] = x
		ans[k + 1] = x + 1
		ans[k + 2] = x - 2
		used = set([x - 1, x, x + 1, x - 2])
		insert = iter([i + 1 for i in range(n * 2 - 1) if i + 1 not in used])
		for i in range(2 * n - 1):
			if ans[i] == -1:
				ans[i] = insert.__next__()
		for i in range(n * 2 - 1):
			print(ans[i])
	else:
		ans = [-1 for i in range(2 * n - 1)]
		k = (n * 2 - 1) // 2
		ans[k - 1] = x + 2
		ans[k] = x
		ans[k + 1] = x - 1
		ans[k + 2] = x + 1
		used = set([x + 1, x, x + 2, x - 1])
		insert = iter([i + 1 for i in range(n * 2 - 1) if i + 1 not in used])
		for i in range(2 * n - 1):
			if ans[i] == -1:
				ans[i] = insert.__next__()
		for i in range(n * 2 - 1):
			print(ans[i])
else:
	print('No')


import sys
sys.setrecursionlimit(10 ** 7)

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

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

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

def LI2():
	return list(map(int, sys.stdin.readline().rstrip()))

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

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

def LS2():
	return list(sys.stdin.readline().rstrip())
(N, x) = MI()
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
A = [i for i in range(1, 2 * N)]
A = A + A + A
print(*A[x + N - 1:x + 3 * N - 2], sep='\n')


(N, x) = map(int, input().split())
if x in (1, 2 * N - 1):
	print('No')
	exit()
print('Yes')
if N == 2 and x == 2:
	l = [1, 2, 3]
	print(*l, sep='\n')
elif x == 2:
	l = [4, 1, 2, 3]
	rest = list(range(5, 2 * N))
	m = len(rest) // 2
	l = rest[:m] + l + rest[m:]
	print(*l, sep='\n')
elif x == 2 * N - 2:
	l = [x - 2, x + 1, x, x - 1]
	rest = list(range(1, 2 * N - 4))
	m = len(rest) // 2
	l = rest[:m] + l + rest[m:]
	print(*l, sep='\n')
else:
	l = [x + 2, x - 1, x, x + 1, x - 2]
	rest = list(range(1, x - 2)) + list(range(x + 3, 2 * N))
	m = len(rest) // 2
	l = rest[:m] + l + rest[m:]
	print(*l, sep='\n')


(n, x) = map(int, input().split())

def calc(a):
	b = []
	for i in range(len(a) - 2):
		b.append(list(sorted(a[i:i + 3]))[1])
	if len(b) == 1:
		return b[0]
	else:
		return calc(b)
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
print('Yes')
if x == 2:
	center = 2
	r1 = 1
	r2 = 3
	l = 4
else:
	center = x
	r1 = x + 1
	r2 = 1
	l = 2
ans = []
y = 1
for i in range(n - 2):
	while y in [center, r1, r2, l]:
		y += 1
	ans.append(y)
	y += 1
ans.append(l)
ans.append(center)
ans.append(r1)
ans.append(r2)
for i in range(n - 3):
	while y in [center, r1, r2, l]:
		y += 1
	ans.append(y)
	y += 1
if n == 2:
	ans = [1, 2, 3]
for x in ans:
	print(x)


from collections import deque
(N, x) = map(int, input().split())
if N == 2:
	if x == 2:
		print('Yes')
		for i in range(1, 4):
			print(i)
	else:
		print('No')
else:
	M = 2 * N - 1
	if x == 1 or x == M:
		print('No')
	else:
		print('Yes')
		ans = [0] * M
		num = deque(list(range(1, M + 1)))
		if x == 2:
			ans[M // 2] = x
			ans[M // 2 - 1] = 1
			num.remove(x)
			num.remove(1)
			for i in range(M):
				if ans[i] == 0:
					ans[i] = num.popleft()
		else:
			ans[M // 2] = x
			ans[M // 2 - 1] = x + 1
			ans[M // 2 - 2] = x - 2
			ans[M // 2 + 1] = x - 1
			num.remove(x)
			num.remove(x + 1)
			num.remove(x - 2)
			num.remove(x - 1)
			for i in range(M):
				if ans[i] == 0:
					ans[i] = num.popleft()
		for i in range(M):
			print(ans[i])


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		print(*[1, 2, 3], sep='\n')
	elif x == 2:
		ans = [3, 2, 1, 4]
		remain = [i for i in range(5, 2 * n)]
		ans = remain[:len(remain) // 2] + ans + remain[len(remain) // 2:]
		print(*ans, sep='\n')
	else:
		ans = [x - 1, x, x + 1, x - 2]
		remain = [i for i in range(1, x - 2)] + [i for i in range(x + 2, 2 * n)]
		ans = remain[:len(remain) // 2] + ans + remain[len(remain) // 2:]
		print(*ans, sep='\n')


f = lambda : map(int, input().split())
(n, x) = f()
import sys
if x == 1 or x == 2 * n - 1:
	print('No')
	sys.exit()
if n == 2:
	print(*['Yes', 1, 2, 3], sep='\n')
else:
	print('Yes')
	a = list(range(1, x - 1)) + list(range(x + 2, 2 * n))
	b = [x - 1, x, x + 1]
	c = a[n - 2:] + b + a[:n - 2]
	print(*c, sep='\n')


(n, x) = [int(item) for item in input().split()]
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
if n == 2:
	print('Yes')
	print('1 2 3')
	exit()
ans = [0] * (2 * n - 1)
used = [0] * (2 * n - 1)
if x >= n:
	ans[n - 1] = 2 * n - 1
	used[2 * n - 1 - 1] = 1
	ans[n] = x
	used[x - 1] = 1
	ans[n + 1] = x - 1
	used[x - 2] = 1
	ans[n - 2] = x - 2
	used[x - 3] = 1
else:
	ans[n - 1] = 1
	used[0] = 1
	ans[n] = x
	used[x - 1] = 1
	ans[n + 1] = x + 1
	used[x] = 1
	ans[n - 2] = x + 2
	used[x + 1] = 1
it = 0
for i in range(2 * n - 1):
	if ans[i] == 0:
		while used[it] != 0:
			it += 1
		ans[i] = it + 1
		it += 1
print('Yes')
print(' '.join([str(item) for item in ans]))


import sys
(N, X) = map(int, input().split())
res = 2 * N - 1
if X == 1 or X == 2 * N - 1:
	print('No')
	sys.exit()
result = [0] * res
left = X - 1
result[N - 1] = X
right = X + 1
left_idx = N - 2
right_idx = N
cnt = 0
while left > 0 and right < 2 * N:
	if cnt % 2 == 0:
		result[left_idx] = left
		result[right_idx] = right
	else:
		result[left_idx] = right
		result[right_idx] = left
	left_idx -= 1
	left -= 1
	right_idx += 1
	right += 1
	cnt += 1
if left > 0:
	for x in range(left_idx, -1, -1):
		result[x] = left
		left -= 1
	for x in range(right_idx, 2 * N - 1):
		result[x] = left
		left -= 1
if right < 2 * N:
	for x in range(left_idx, -1, -1):
		result[x] = right
		right += 1
	for x in range(right_idx, 2 * N - 1):
		result[x] = right
		right += 1
print('Yes')
for x in result:
	print(x)


(N, x) = map(int, input().split())
ans = (list(range(1, 2 * N)) * 2)[(x - N) % (2 * N - 1):(x - N) % (2 * N - 1) + 2 * N - 1]
if x == 1 or x == 2 * N - 1:
	ans = []
if ans:
	print('Yes')
	print(*ans)
else:
	print('No')


(n, x) = map(int, input().split())
assert n >= 2
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	a = [x - 1, x, x + 1]
	b = list(range(1, x - 1)) + list(range(x + 2, 2 * n))
	ans = b[n - 2:] + a + b[:n - 2]
	print('Yes')
	print(*ans, sep='\n')


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
(N, n) = map(int, read().split())

def main(N, n):
	if n in (1, 2 * N - 1):
		print('No')
		return
	if N == 2:
		A = [1, 2, 3]
		print('Yes')
		print(*A, sep='\n')
		return
	if n == 2:
		(a, b, c, d) = (3, 2, 1, 4)
	else:
		(a, b, c, d) = (n - 1, n, n + 1, n - 2)
	nums = list(range(1, N + N))
	for x in (a, b, c, d):
		nums.remove(x)
	k = len(nums) // 2
	A = nums[:k] + [a, b, c, d] + nums[k:]
	print('Yes')
	print(*A, sep='\n')
main(N, n)


(N, x) = [int(x) for x in input().split()]
N = 2 * N - 1
if x == 1 or x == N:
	print('No')
else:
	print('Yes')
	l = list(range(2, N))
	l.remove(x)
	for i in l[:(N - 3) // 2] + [1, x, N] + l[(N - 3) // 2:]:
		print(i)


import sys
from collections import deque
(N, X) = map(int, input().split())
if X == 1 or X == 2 * N - 1:
	print('No')
	sys.exit()
l = 2 * N - 1
print('Yes')
if N == 2:
	print(3)
	print(2)
	print(1)
	sys.exit()
if X == 2:
	h = deque()
	h.append(3)
	h.append(2)
	h.append(1)
	h.append(4)
	s = 0
	t = 0
	while s != N - 2:
		t += 1
		if 4 < t:
			s += 1
			h.appendleft(t)
	s = 0
	while s != N - 3:
		t += 1
		if 4 < t:
			s += 1
			h.append(t)
	print('\n'.join(map(str, h)))
	sys.exit()
h = deque()
h.append(X - 1)
h.append(X)
h.append(X + 1)
h.append(X - 2)
s = 0
t = 0
while s != N - 2:
	t += 1
	if X + 1 < t or t < X - 2:
		s += 1
		h.appendleft(t)
s = 0
while s != N - 3:
	t += 1
	if X + 1 < t or t < X - 2:
		s += 1
		h.append(t)
print('\n'.join(map(str, h)))


def main():
	(N, X) = list(map(int, input().split()))
	if X in [1, 2 * N - 1]:
		print('No')
		return
	if N == 2:
		ans = [1, 2, 3]
	else:
		target_list = [X + 2, X - 1, X, X + 1, X - 2]
		target_list = [n for n in target_list if 1 <= n <= 2 * N - 1]
		rest_list = [n for n in range(1, 2 * N) if n not in target_list]
		len_rest = len(rest_list)
		ans = rest_list[:len_rest // 2] + target_list + rest_list[len_rest // 2:]
	print('Yes')
	for a in ans:
		print(a)
main()


import sys
from statistics import median
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7
res = 0

def resolve():

	def dfs(S):
		global res
		if len(S) == 1:
			res = S[0]
			return
		tmp = []
		for i in range(1, len(S) - 1):
			t = median([S[i - 1], S[i], S[i + 1]])
			tmp.append(t)
		dfs(tmp)
	(n, x) = map(int, input().split())
	if x == 1 or x == 2 * n - 1:
		print('No')
		exit()
	n = 2 * n - 1
	ans = [0] * n
	num = x
	for i in range(n // 2, n):
		ans[i] = num
		num += 1
		if num > n:
			num = 1
	for i in range(n // 2):
		ans[i] = num
		num += 1
		if num > n:
			num = 1
	print('Yes')
	print(*ans, sep='\n')
resolve()


def solve(n, x):
	m = 2 * n - 1
	if x == 1 or x == m:
		print('No')
		return
	if x <= n:
		tmp = [1] + list(range(x, m + 1)) + list(range(2, x))
	else:
		tmp = [m] + list(range(x, 0, -1)) + list(range(x + 1, m))
	ans = list(reversed(tmp[0::2])) + tmp[1::2]
	print('Yes')
	print('\n'.join(map(str, ans)))
(n, x) = map(int, input().split())
solve(n, x)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
if N > 2:
	n = 2 * N - 1
	ans = [0] * n
	if x > 2:
		num = 1
		ans[N - 3] = x - 1
		ans[N - 2] = x + 1
		ans[N - 1] = x
		ans[N] = x - 2
		for i in range(2 * N - 1):
			if ans[i] != 0:
				print(ans[i])
			else:
				if num == x - 2:
					num += 4
				print(num)
				num += 1
	else:
		num = 2 * N - 1
		ans[N - 3] = 3
		ans[N - 2] = 1
		ans[N - 1] = 2
		ans[N] = 4
		for i in range(2 * N - 1):
			if ans[i] != 0:
				print(ans[i])
			else:
				print(num)
				num -= 1
else:
	for i in range(1, 4):
		print(i)


(n, x) = map(int, input().split())
if x == n * 2 - 1 or x == 1:
	print('No')
else:
	print('Yes')
	ans = []
	if n == 2:
		print(1, 2, 3)
		exit()
	elif x == 2:
		ans = [x + 1, x, x - 1, x + 2]
	else:
		ans = [x - 1, x, x + 1, x - 2]
	cnt = 0
	i = 1
	while cnt < n - 2:
		if i in ans:
			i += 1
			continue
		else:
			print(i, end=' ')
			cnt += 1
			i += 1
	for j in ans:
		print(j, end=' ')
	while i < 2 * n:
		if i in ans:
			i += 1
			continue
		print(i, end=' ')
		i += 1


def main():
	(n, x) = map(int, input().split())
	if x == 1 or x == 2 * n - 1:
		print('No')
	elif x == 2:
		print('Yes')
		lst = [i for i in range(1, x - 1)] + [i for i in range(x + 3, 2 * n)]
		for i in range(n - 2):
			print(lst[i])
		print(x + 1)
		print(x)
		print(x - 1)
		if n >= 3:
			print(x + 2)
		for i in range(n + 2, 2 * n - 1):
			print(lst[i - 4])
	else:
		print('Yes')
		lst = [i for i in range(1, x - 2)] + [i for i in range(x + 2, 2 * n)]
		for i in range(n - 2):
			print(lst[i])
		print(x - 1)
		print(x)
		print(x + 1)
		print(x - 2)
		for i in range(n + 2, 2 * n - 1):
			print(lst[i - 4])
main()


def main():
	(n, x) = map(int, input().split())
	j = 1
	if x == 1 or x == 2 * n - 1:
		print('No')
		return 0
	print('Yes')
	ans = []
	for i in range(n - 2):
		if j == x - 1:
			j += 3
		ans.append(j)
		j += 1
	ans += [x - 1, x, x + 1]
	for i in range(n - 2):
		if j == x - 1:
			j += 3
		ans.append(j)
		j += 1
	print(*ans)
	return 0
main()


(n, x) = map(int, input().split())
if 1 < x < 2 * n - 1:
	print('Yes')
else:
	print('No')
	exit()
t = list(range(2, 2 * n - 1))
t.remove(x)
ans = t[:n - 2] + [2 * n - 1, x, 1] + t[n - 2:]
print(*ans, sep='\n')


(n, x) = map(int, input().split())
if x in [1, 2 * n - 1]:
	print('No')
else:
	print('Yes')
	mid = [x - 1, x, x + 1]
	if x != 2 * n - 2:
		mid = [x + 2] + mid
	if x != 2:
		mid += [x - 2]
	hoge = [i for i in range(1, 2 * n) if i not in mid]
	ans = hoge[:n - 2] + mid + hoge[n - 2:]
	print(*ans, sep='\n')


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
elif n == 2:
	print('Yes')
	for i in range(1, 4):
		print(i)
else:
	if x == 2:
		ans = [3, 1, 2, 4]
	else:
		ans = [x - 1, x, x + 1, x - 2]
	key = []
	for i in range(1, 2 * n):
		if i in ans:
			continue
		key.append(i)
	ans = key[:len(key) // 2] + ans + key[len(key) // 2:]
	print('Yes')
	for a in ans:
		print(a)


from collections import deque
(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
elif N == 2:
	print('Yes')
	for x in range(1, 4):
		print(x)
else:
	print('Yes')
	if x == 2:
		num = deque(list(range(5, 2 * N)))
		que = deque([3, 2, 1, 4])
	else:
		num = deque(list(range(1, x - 2)) + list(range(x + 2, 2 * N)))
		que = deque([x - 1, x, x + 1, x - 2])
	for i in range(2 * N - 1):
		if N - 2 <= i <= N + 1:
			print(que.popleft())
		else:
			print(num.popleft())


(N, x) = list(map(int, input().split(' ')))
if x == 1 or x >= 2 * N - 1:
	print('No')
else:
	m = N
	if x == m:
		print('Yes')
		ans = range(1, 2 * N)
		for i in ans:
			print(i)
	elif x < m:
		print('Yes')
		for i in range(x + 1, m + 1):
			print(i)
		for i in range(1, x + 1):
			print(i)
		for i in range(m + 1, 2 * N):
			print(i)
	else:
		print('Yes')
		for i in range(1, m):
			print(i)
		for i in range(x, N * 2):
			print(i)
		for i in range(m, x):
			print(i)


def main():
	(n, x) = map(int, input().split())
	if x == 1 or x == 2 * n - 1:
		print('No')
		return 0
	print('Yes')
	if n == 2:
		ans = [1, 2, 3]
	elif n >= 3 and (x == 2 or x == 2 * n - 2):
		if x == 2:
			ans = [3, 2, 1, 4]
			key = [int(x) for x in range(5, 2 * n)]
			(key, key2) = (list(reversed(key[:len(key) // 2])), key[len(key) // 2:])
			ans = key + ans + key2
		else:
			ans = [2 * n - 3, 2 * n - 2, 2 * n - 1, 2 * n - 4]
			key = [int(x) for x in range(1, 2 * n - 4)]
			(key, key2) = (list(reversed(key[:len(key) // 2])), key[len(key) // 2:])
			ans = key + ans + key2
	else:
		ans = [x - 2, x + 1, x, x - 1, x + 2]
		key = [int(x) for x in range(1, x - 2)] + [int(x) for x in range(x + 3, n * 2)]
		ans = key[len(key) // 2:] + ans + key[:len(key) // 2]
	for a in ans:
		print(a)
main()


(a, b) = map(int, input().split())
if b < 2 or b > 2 * a - 2:
	print('No')
else:
	print('Yes')
	d = [i for i in range(1, b - 1)] + [i for i in range(b + 1, a + 1)] + [b - 1, b] + [i for i in range(a + 1, 2 * a)] if 1 <= b < a + 1 else [i for i in range(1, a)] + [b, b + 1] + [i for i in range(a, b)] + [i for i in range(b + 2, 2 * a)]
	for i in d:
		print(i)


(N, x) = map(int, input().split())
MAX = 2 * N - 1
if x in [1, MAX]:
	print('No')
else:
	print('Yes')
	great = [i for i in range(x + 1, MAX + 1)]
	small = [i for i in range(1, x)]
	if len(great) > N - 1:
		small = great[N - 1:] + small
		great = great[:N - 1]
	elif len(small) > N - 1:
		great = great + small[N - 1:]
		small = small[:N - 1]
	ans = small + [x] + great
	print(*ans, sep='\n')


(N, x) = map(int, input().split())
if N == 2:
	if x == 2:
		print('Yes')
		print('1')
		print('2')
		print('3')
	else:
		print('No')
	exit()
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
diff = N - x
if diff < 0:
	ans = list(range(1, 2 * N))
	ans = ans[abs(diff):] + ans[:abs(diff)]
elif diff > 0:
	ans = list(range(1, 2 * N))
	ans = ans[2 * N - diff - 1:] + ans[:-diff]
else:
	ans = list(range(1, 2 * N))
for a in ans:
	print(a)


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
print('Yes')
if n == 2:
	print(*[1, 2, 3], sep='\n')
else:
	l = list(range(1, 2 * n))
	if x == 2:
		a = [3, 2, 1, 4]
	else:
		a = [x - 1, x, x + 1, x - 2]
	l = list(set(l) - set(a))
	m = len(l) // 2
	b = l[:m] + a + l[m:]
	print(*b, sep='\n')


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
elif x == 2:
	print('Yes')
	if n == 2:
		print(x + 1)
		print(x)
		print(x - 1)
	else:
		ans = []
		for i in range(1, 2 * n):
			if x - 1 <= i <= x + 2:
				continue
			else:
				ans.append(i)
		cnt = 0
		for i in range(1, 2 * n):
			if i == n - 1:
				print(x + 1)
			elif i == n:
				print(x)
			elif i == n + 1:
				print(x - 1)
			elif i == n + 2:
				print(x + 2)
			else:
				print(ans[cnt])
				cnt += 1
else:
	print('Yes')
	if n == 2:
		print(x + 1)
		print(x)
		print(x - 1)
	else:
		ans = []
		for i in range(1, 2 * n):
			if x - 2 <= i <= x + 1:
				continue
			else:
				ans.append(i)
		cnt = 0
		for i in range(1, 2 * n):
			if i == n - 1:
				print(x - 2)
			elif i == n:
				print(x)
			elif i == n + 1:
				print(x + 1)
			elif i == n + 2:
				print(x - 1)
			else:
				print(ans[cnt])
				cnt += 1


(n, x) = (int(i) for i in input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	for i in range((x + n - 1) % (2 * n - 1), 0, -1):
		print(i)
	for i in range(2 * n - 1, (x + n - 1) % (2 * n - 1), -1):
		print(i)


(N, x) = map(int, input().split())
if x in [1, 2 * N - 1]:
	print('No')
else:
	print('Yes')
	a = [None] * (2 * N - 1)
	unused = set(range(1, 2 * N))
	a[N - 1] = x
	a[N - 2] = x - 1
	a[N] = x + 1
	unused -= {x - 1, x, x + 1}
	if N - 3 >= 0 and x + 2 <= 2 * N - 1:
		a[N - 3] = x + 2
		unused -= {x + 2}
	if N + 1 < len(a) and x - 2 >= 1:
		a[N + 1] = x - 2
		unused -= {x - 2}
	for i in range(len(a)):
		if a[i] is None:
			a[i] = unused.pop()
	print(' '.join(map(str, a)))


(N, x) = map(int, input().split())
A = [0 for i in range(2 * N - 1)]
if N == 2:
	if x == 2:
		print('Yes')
		print(1)
		print(2)
		print(3)
	else:
		print('No')
elif N >= 3:
	if x == 1 or x == 2 * N - 1:
		print('No')
	elif x > 2 and x < 2 * N - 2:
		(A[N - 3], A[N - 2], A[N - 1], A[N], A[N + 1]) = (1, 2 * N - 1, x, 2, 2 * N - 2)
		j = 2
		for i in range(2 * N - 1):
			if i < N - 3 or i > N + 1:
				j += 1
				if j == x:
					j += 1
				A[i] = j
		print('Yes')
		for i in range(2 * N - 1):
			print(A[i])
	elif x == 2 or x == 2 * N - 2:
		(A[N - 2], A[N - 1], A[N]) = (1, x, 2 * N - 1)
		j = 1
		for i in range(2 * N - 1):
			if i < N - 2 or i > N:
				j += 1
				if j == x:
					j += 1
				A[i] = j
		print('Yes')
		for i in range(2 * N - 1):
			print(A[i])


(N, x) = map(int, input().split())
if 1 < x < 2 * N - 1:
	print('Yes')
	order = (1, -1)[x > N]
	l = list(range(1, 2 * N)[::order])
	for i in range(2 * N - 1):
		print(l[i - abs(x - N)])
else:
	print('No')


(N, x) = map(int, input().split())
S = 2 * N - 1
if 1 < x < S:
	print('Yes')
	li = list(range(1, S + 1))
	print('\n'.join(map(str, li[x - N:] + li[:x - N])))
else:
	print('No')


import sys
input = sys.stdin.buffer.readline
(N, x) = map(int, input().split())
if N == 2:
	if x == 2:
		print('Yes')
		print(1)
		print(2)
		print(3)
	else:
		print('No')
	exit(0)
if x == 1 or x == 2 * N - 1:
	print('No')
	exit(0)
print('Yes')
if x == 2:
	i = 4
	for _ in range(1, N - 2):
		i += 1
		print(i)
	print(x + 2)
	print(x - 1)
	print(x)
	print(x + 1)
	for _ in range(N + 2, 2 * N):
		i += 1
		print(i)
else:
	i = 0
	for _ in range(1, N - 1):
		if i == x - 3:
			i += 5
		else:
			i += 1
		print(i)
	print(x - 1)
	print(x)
	print(x + 1)
	print(x - 2)
	for _ in range(N + 3, 2 * N):
		if i == x - 3:
			i += 5
		else:
			i += 1
		print(i)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	lis = [0 for _ in range(2 * N - 1)]
	lis[N - 1] = x
	lis[N] = x - 1
	lis[N - 2] = x + 1
	count = 1
	for i in range(2 * N - 1):
		if count == x - 1:
			count = x + 2
		if abs(N - i - 1) <= 1:
			None
		else:
			lis[i] = count
			count += 1
	print('Yes')
	for j in lis:
		print(j)


(n, x) = map(int, input().split())
from collections import deque
if x == 2 * n - 1 or x == 1:
	print('No')
else:
	print('Yes')
	ans = deque([])
	ans.append(x)
	ans.appendleft(1)
	ans.append(2 * n - 1)
	for i in range(2, n):
		if x != i:
			ans.append(i)
		if x != 2 * n - i:
			ans.appendleft(2 * n - i)
	if x != n and x > n:
		ans.appendleft(n)
	if x != n and x < n:
		ans.append(n)
	for i in ans:
		print(i)


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
print('Yes')
ans = [i for i in range(1, 2 * n)]
ans.remove(x - 1)
ans.remove(x)
ans.remove(x + 1)
for i in range(n - 2):
	print(ans[i])
print(x - 1)
print(x)
print(x + 1)
for i in range(n - 2):
	print(ans[n - 2 + i])


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	m = n + 1
	l = n - 1
	a = [i + 1 for i in range(2 * n - 1)]
	a[x - 1] = a[n - 1]
	a[n - 1] = x
	if x < n:
		a[0] = a[n - 2]
		a[n - 2] = 1
		if n >= 3:
			a[2 * n - 2] = a[n - 3]
			a[n - 3] = 2 * n - 1
	else:
		a[2 * n - 2] = a[n]
		a[n] = 2 * n - 1
		if n >= 3:
			a[0] = a[n + 1]
			a[n + 1] = 1
	for i in range(2 * n - 1):
		print(a[i])


(N, x) = list(map(int, input().split()))
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	a = []
	if N == 2:
		a = [1, 2, 3]
	elif x == 2:
		n = 5
		for i in range(2 * N - 4):
			if i == N - 2:
				a.append('\n'.join(map(str, [x + 1, x, x - 1, x + 2])))
			else:
				a.append(n)
				n += 1
	else:
		n = 5 if x == 3 else 1
		for i in range(2 * N - 4):
			if i == N - 2:
				a.append('\n'.join(map(str, [x - 1, x, x + 1, x - 2])))
			else:
				a.append(n)
				n = x + 2 if n == x - 3 else n + 1
	for i in range(len(a)):
		print(a[i])


(N, X) = map(int, input().split())
S = 2 * N - 1
print(*[['No'], ['Yes'] + [1 + (X - N + K) % S for K in range(S)]][1 < X < S], sep='\n')


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	if x == N:
		A = list(range(1, 2 * N))
	elif N < x < 2 * N - 1:
		A = list(range(1 + x - N, 2 * N)) + list(range(1, 1 + x - N))
	else:
		A = list(range(2 * N - (N - x), 2 * N)) + list(range(1, 2 * N - (N - x)))
	print('\n'.join(map(str, A)))


(n, x) = map(int, input().split())
if 1 < x < 2 * n - 1:
	print('Yes')
	ans = [0] * (2 * n - 1)
	use = [0] * (2 * n - 1)
	if n == 2:
		ans = [i for i in range(1, 4)]
	else:
		if not x == 2 * n - 2:
			(ans[n - 1], ans[n]) = (x - 1, x)
			(ans[n - 2], ans[n + 1]) = (x + 1, x + 2)
			for i in range(4):
				use[x - 2 + i] = 1
		else:
			(ans[n - 1], ans[n]) = (x + 1, x)
			(ans[n - 2], ans[n + 1]) = (x - 1, x - 2)
			for i in range(4):
				use[x - 3 + i] = 1
		i = 0
		for j in range(2 * n - 1):
			if ans[j] == 0:
				while True:
					if use[i] == 0:
						use[i] = 1
						break
					i += 1
				ans[j] = i + 1
	for i in ans:
		print(i)
else:
	print('No')


(N, x) = map(int, input().split())
if N == 2:
	if x != N:
		print('No')
		exit(0)
elif abs(N - x) > N - 2:
	print('No')
	exit(0)
print('Yes')
if N == 2:
	for i in range(3):
		print(i + 1)
else:
	left = []
	right = []
	if x < 2 * N - 2:
		ans = [x + 2, x - 1, x, x + 1]
		s = [i for i in range(1, 2 * N) if i < x - 1 or i > x + 2]
		for i in range((2 * N - 5) // 2):
			print(s.pop())
		for i in range(4):
			print(ans[i])
		for i in range((2 * N - 5) // 2 + 1):
			print(s.pop())
	else:
		ans = [x - 2, x + 1, x, x - 1]
		s = [i for i in range(1, 2 * N) if i < x - 2 or i > x + 1]
		for i in range((2 * N - 5) // 2):
			print(s.pop())
		for i in range(4):
			print(ans[i])
		for i in range((2 * N - 5) // 2 + 1):
			print(s.pop())


def solve(n, x):
	if x in {1, n * 2 - 1}:
		return ['No']
	if n == 2:
		a = ['Yes'] + [1, 2, 3]
		return a
	a = [-1] * (n * 2 - 1)
	a[n - 1] = x
	if x == 2:
		a[n - 2] = n * 2 - 2
		a[n] = 1
		a[n + 1] = n * 2 - 1
	else:
		a[n - 2] = 1
		a[n] = n * 2 - 1
		a[n + 1] = 2
	remains = set(range(1, n * 2)) - set(a)
	for (ind, a_) in enumerate(a):
		if a_ == -1:
			a[ind] = remains.pop()
	a = ['Yes'] + a
	return a
(n, x) = map(int, input().split())
print(*solve(n, x), sep='\n')


import sys

def MI():
	return map(int, sys.stdin.readline().rstrip().split())
(N, x) = MI()
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
A = [i for i in range(1, 2 * N)]
A = A + A + A
print(*A[x + N - 1:x + 3 * N - 2], sep='\n')


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		print(1, 2, 3, sep='\n')
		exit()
	if x == 2:
		a = [x + 1, x, x - 1, x + 2]
	else:
		a = [x - 1, x, x + 1, x - 2]
	b = list(set(range(1, 2 * n)) - set(a))
	for i in a[::-1]:
		b.insert(n - 2, i)
	print(*b, sep='\n')


(N, x) = map(int, input().split())
ANS = []
for i in range(1, 2 * N):
	ANS.append(i)
if x == 1 or x == N * 2 - 1:
	print('No')
else:
	print('Yes')
	if x == N:
		for j in range(len(ANS)):
			print(ANS[j])
	elif x < N:
		for j in range(1, N):
			if ANS[j] == x:
				pass
			else:
				print(ANS[j])
		print(1)
		print(x)
		for k in range(N, N * 2 - 1):
			print(ANS[k])
	elif x > N:
		for j in range(N - 1):
			print(ANS[j])
		print(x)
		print(N * 2 - 1)
		for k in range(N - 1, N * 2 - 2):
			if ANS[k] == x:
				pass
			else:
				print(ANS[k])


from collections import deque
(n, x) = map(int, input().split())
print('Yes' if 1 < x < 2 * n - 1 else 'No')
if 1 < x < 2 * n - 1:
	ans = deque([1, x, 2 * n - 1])
	cnt = deque([i for i in range(2, 2 * n - 1) if i != x])
	for i in range(n - 2):
		ans.append(cnt.popleft())
		ans.appendleft(cnt.pop())
	print(*ans, sep='\n')


(n, x) = map(int, input().split())

def get_result():
	if x == 1 or x == 2 * n - 1:
		return []
	if n == 2:
		return [1, 2, 3]
	if x == 2:
		center = [3, 2, 1, 4]
		others = list(range(5, 2 * n))
	elif x == 2 * n - 2:
		center = [2 * n - 3, 2 * n - 2, 2 * n - 1, 2 * n - 4]
		others = list(range(1, 2 * n - 4))
	else:
		center = [x + 1, x, x - 1, x + 2]
		others = list(range(1, x - 1)) + list(range(x + 3, 2 * n))
	split_idx = n - 2
	result = others[:split_idx] + center + others[split_idx:]
	return result
res = get_result()
if len(res) == 0:
	print('No')
else:
	print('Yes')
	for r in res:
		print(r)


from collections import deque
(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
if x == 2:
	ansl = []
	q = deque()
	for i in range(5, 2 * n):
		q.append(i)
	for i in range(0, 2 * n - 1):
		if i == n - 2:
			ansl.append(3)
		elif i == n - 1:
			ansl.append(2)
		elif i == n:
			ansl.append(1)
		elif i == n + 1:
			ansl.append(4)
		else:
			ansl.append(q.pop())
else:
	ansl = []
	q = deque()
	fix = [x - 1, x, x + 1, x - 2]
	for i in range(1, 2 * n):
		if i not in fix:
			q.append(i)
	for i in range(0, 2 * n - 1):
		if i == n - 2:
			ansl.append(x - 1)
		elif i == n - 1:
			ansl.append(x)
		elif i == n:
			ansl.append(x + 1)
		elif i == n + 1:
			ansl.append(x - 2)
		else:
			ansl.append(q.pop())
print('Yes')
print(*ansl)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
elif N == 2:
	print('Yes')
	print(1)
	print(2)
	print(3)
else:
	print('Yes')
	if x == 2:
		Key = [x + 1, x, x - 1, x + 2]
	else:
		Key = [x - 1, x, x + 1, x - 2]
	Unit = []
	for i in range(2 * N - 1):
		if i + 1 not in Key:
			Unit.append(i + 1)
	for i in range(N - 2):
		u = Unit.pop()
		print(u)
	for k in Key:
		print(k)
	for i in range(N - 3):
		u = Unit.pop()
		print(u)


from sys import stdout
printn = lambda x: stdout.write(str(x))
inn = lambda : int(input())
inl = lambda : list(map(int, input().split()))
inm = lambda : map(int, input().split())
ins = lambda : input().strip()
DBG = True
BIG = 999999999
R = 10 ** 9 + 7

def ddprint(x):
	if DBG:
		print(x)
(n, x) = inm()
if x in [1, 2 * n - 1]:
	print('No')
	exit()
print('Yes')
if n == 2:
	print(1)
	print(2)
	print(3)
	exit()
a = [0] * (2 * n)
for i in range(1, 2 * n):
	j = i + (x - n)
	if j < 1:
		j += 2 * n - 1
	elif j > 2 * n - 1:
		j -= 2 * n - 1
	a[i] = j
a[n - 1] = x + 1
a[n + 1] = x - 1
for i in range(1, 2 * n):
	print(a[i])


from collections import deque
(N, x) = map(int, input().split())
if x <= 1 or x >= 2 * N - 1:
	print('No')
else:
	print('Yes')
	q = deque([x])
	for i in range(1, N):
		if x - i > 0:
			q.appendleft(x - i)
		else:
			q.appendleft(2 * N - 1 + x - i)
	for i in range(1, N):
		if x + i < 2 * N:
			q.append(x + i)
		else:
			q.append(x + i - (2 * N - 1))
	for p in q:
		print(p)


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
(N, X) = map(int, input().split())
if X in [1, 2 * N - 1]:
	print('No')
	exit()
if N == 2:
	print('Yes')
	print(*[1, 2, 3], sep='\n')
	exit()
rest = set(range(1, 2 * N))
answer = [None] * (2 * N - 1)
center = N - 1
if X <= 2 * N - 3:
	answer[center - 2:center + 2] = (X + 2, X - 1, X, X + 1)
else:
	answer[center - 2:center + 2] = (X - 2, X + 1, X, X - 1)
rest -= set(answer[center - 2:center + 2])
for i in range(2 * N - 1):
	if answer[i] is None:
		answer[i] = rest.pop()
print('Yes')
print(*answer, sep='\n')


from itertools import permutations
(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		ans = [1, 2, 3]
	elif x == 2:
		ans = [i for i in range(1, x - 1)] + [i for i in range(x + 3, 2 * n)]
		ans = ans[:n - 3] + [x + 2, x - 1, x, x + 1] + ans[n - 3:]
	else:
		ans = [i for i in range(1, x - 2)] + [i for i in range(x + 2, 2 * n)]
		ans = ans[:n - 3] + [x - 2, x + 1, x, x - 1] + ans[n - 3:]
	for i in range(2 * n - 1):
		print(ans[i])


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	a = [0] * (2 * N - 1)
	a[N - 1] = x
	a[N - 2] = 1
	a[N] = 2 * N - 1
	pos = 0
	for i in range(2 * N - 1):
		while pos < 2 * N - 1 and a[pos]:
			pos += 1
		if i + 1 == 1 or i + 1 == 2 * N - 1 or i + 1 == x:
			continue
		a[pos] = i + 1
	print('Yes')
	for d in a:
		print(d)


import sys
import heapq
from operator import itemgetter
from collections import deque, defaultdict
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

def sol():
	(N, x) = map(int, input().split())
	if x == 1 or x == 2 * N - 1:
		print('No')
	else:
		print('Yes')
		ans = [None] * (2 * N - 1)
		numList = list(range(1, 2 * N))
		for i in range(3):
			ans[N - 2 + i] = x - 1 + i
			numList[x - 2 + i] = None
		if x > N:
			ans[N + 1] = 1
			numList[0] = None
		elif x < N:
			ans[N - 3] = 2 * N - 1
			numList[2 * N - 2] = None
		numList = list(filter(lambda n: n != None, numList))
		now = 0
		for a in ans:
			if a == None:
				print(numList[now])
				now += 1
			else:
				print(a)
sol()


(n, x) = map(int, input().split())
ans = [None] * (2 * n - 1)
if x == 2 * n - 1 or x == 1:
	print('No')
elif n == 2:
	print('Yes')
	for i in range(1, 4):
		print(i)
else:
	print('Yes')
	if x == 2 * n - 2:
		num = 1
		for i in range(n + 1, 2 * n - 1):
			ans[i] = num
			num += 1
		for i in range(n + 1):
			ans[i] = num
			num += 1
	else:
		ans[n - 1] = x
		ans[n] = x - 1
		ans[n + 1] = x + 2
		ans[n - 2] = x + 1
		num = 1
		for i in range(2 * n - 1):
			if x - 1 <= num <= x + 2:
				num = x + 3
			if n - 2 <= i <= n + 1:
				continue
			ans[i] = num
			num += 1
	for i in range(2 * n - 1):
		print(ans[i])


(N, x) = map(int, input().split())
Las = 2 * N - 1
NO = 'No'
YES = 'Yes'
if N == 2:
	if x == 2:
		print(YES)
		for i in range(1, 3 + 1):
			print(i)
	else:
		print(NO)
elif x >= 3 and x <= Las - 2:
	print(YES)
	cnt = 1
	for i in range(1, N - 2):
		if cnt == x - 2:
			cnt += 5
			print(cnt)
			cnt += 1
		else:
			print(cnt)
			cnt += 1
	print(x - 2)
	print(x + 1)
	print(x)
	print(x - 1)
	print(x + 2)
	for i in range(1, N - 2):
		if cnt == x - 2:
			cnt += 5
			print(cnt)
			cnt += 1
		else:
			print(cnt)
			cnt += 1
elif x == 2:
	print(YES)
	flag = True
	for i in range(1, Las + 1):
		if i == N - 1:
			print(1)
		elif i == N:
			print(2)
			flag = False
		elif flag:
			print(i + 2)
		else:
			print(i)
elif x == Las - 1:
	print(YES)
	flag = True
	for i in range(1, Las + 1):
		if i == N - 1:
			print(Las)
		elif i == N:
			print(Las - 1)
			flag = False
		elif flag:
			print(i)
		else:
			print(i - 2)
else:
	print(NO)


(n, x) = map(int, input().split())
A = [i for i in range(1, 2 * n)]
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		print(*A, sep='\n')
	else:
		if x == 2:
			T = [3, 2, 1, 4]
		else:
			T = [x - 1, x, x + 1, x - 2]
		S = list(set(A) - set(T))
		ans = S[:n - 2] + T + S[n - 2:]
		print(*ans, sep='\n')


(n, x) = map(int, input().split())
ng = [1, 2 * n - 1]
if x in ng:
	print('No')
else:
	print('Yes')
	tmp = [i for i in range(2, 2 * n - 1) if i != x]
	ans = tmp[:n - 2] + [1, x, 2 * n - 1] + tmp[n - 2:]
	for item in ans:
		print(item)


(n, x) = map(int, input().split())
if n == 2:
	if x == 2:
		print('Yes')
		print('\n'.join(['1', '2', '3']))
	else:
		print('No')
elif x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if x == 2:
		ans = list(range(3, 2 * n - 2))
		ans = ans[:n - 3] + [2 * n - 1, 1, 2, 2 * n - 2] + ans[n - 3:]
	else:
		ans = list(range(2 * n - 1))
		ans = ans[3:x] + ans[x + 1:2 * n - 1]
		ans = ans[:n - 3] + [1, 2 * n - 1, x, 2] + ans[n - 3:]
	print('\n'.join((str(i) for i in ans)))


(n, x) = list(map(int, input().split()))
if x == 1 or x == 2 * n - 1:
	print('No')
elif x == 2 * n - 2:
	print('Yes')
	for i in range(n - 1):
		print(i + 1)
	print(x)
	print(2 * n - 1)
	for i in range(n - 1, x - 1):
		print(i + 1)
else:
	print('Yes')
	l = [i for i in range(1, x - 1)] + [i for i in range(x, 2 * n - 3)]
	for i in range(n - 2):
		print(l[i] + 1)
	print(2 * n - 1)
	print(x)
	print(1)
	print(2 * n - 2)
	for i in range(n - 2, 2 * n - 5):
		print(l[i] + 1)


(N, i) = map(int, input().split())
i -= 1
N -= 1
if i == 0 or i == 2 * N:
	print('No')
	exit()
res = list(range(2 * N + 1))
if i > N:
	res = res[i - N:] + res[:i - N]
else:
	res = res[i + N + 1:] + res[:i + N + 1]
(res[N + 1], res[N - 1]) = (res[N - 1], res[N + 1])
print('Yes')
print(*(a + 1 for a in res), sep='\n')


(n, x) = map(int, input().split())
if n == 2 and x == 2:
	print('Yes', *[1, 2, 3], sep='\n')
elif x == 1 or x >= 2 * n - 1:
	print('No')
else:
	print('Yes')
	if x == 2:
		t = [4, 2, 1, 3]
	else:
		t = [x - 1, x + 1, x, x - 2]
	p = [i for i in range(1, 2 * n) if i not in t]
	print(*p[:n - 3] + t + p[n - 3:], sep='\n')


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
if N == 2:
	for i in range(1, 4):
		print(i)
	exit()
x -= 1
A = [-1 for i in range(2 * N - 1)]
B = [0 for i in range(2 * N - 1)]
if x == 1:
	A[N - 2] = x + 1
	A[N - 1] = x
	A[N] = x - 1
	A[N + 1] = x + 2
	for i in range(4):
		B[x - 1 + i] = 1
else:
	A[N - 2] = x - 1
	A[N - 1] = x
	A[N] = x + 1
	A[N + 1] = x - 2
	for i in range(4):
		B[x - 2 + i] = 1
C = []
for i in range(2 * N - 1):
	if B[i] == 0:
		C.append(i)
for i in range(2 * N - 1):
	if A[i] != -1:
		continue
	A[i] = C[-1]
	C.pop()
for i in A:
	print(i + 1)


(N, x) = map(int, input().split())
if N == 2:
	if x == 2:
		print('Yes')
		print(1)
		print(2)
		print(3)
	else:
		print('No')
else:
	from collections import deque
	used = [True] + [False] * (2 * N)
	if x == 1 or x == 2 * N - 1:
		print('No')
		exit()
	elif x == 2:
		ans = deque([3, 1, 2, 4, 5])
		for i in range(1, 6):
			used[i] = True
	elif x == 3:
		ans = deque([4, 1, 3, 5, 2])
		for i in range(1, 6):
			used[i] = True
	else:
		ans = deque([x - 3, x - 1, x, x + 1, x - 2])
		for i in range(-3, 2):
			used[x + i] = True
	p = 0
	for i in range(2 * N):
		if not used[i]:
			p ^= 1
			if p:
				ans.append(i)
			else:
				ans.appendleft(i)
	print('Yes')
	for e in list(ans):
		print(e)


import sys
(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	sys.exit()
if N == 2:
	print('Yes')
	print(1)
	print(2)
	print(3)
	sys.exit()
print('Yes')
n = 2 * N - 1
ans = [None] * n
tmp = ans[n // 2 - 1:n // 2 + 3]
if x != 2 * N - 2:
	tmp[0] = x + 1
	tmp[1] = x
	tmp[2] = x - 1
	tmp[3] = x + 2
else:
	tmp[0] = x - 1
	tmp[1] = x
	tmp[2] = x + 1
	tmp[3] = x - 2
cnt = 1
ans[n // 2 - 1:n // 2 + 3] = tmp
for i in range(n):
	if x != 2 * N - 2:
		if cnt == x - 1:
			cnt += 4
	elif cnt == x - 2:
		cnt += 4
	if ans[i] is None:
		ans[i] = cnt
		cnt += 1
for i in ans:
	print(i)


(N, x) = map(int, input().split())
if N == 2:
	if x == 2:
		print('Yes')
		for i in range(1, 4):
			print(i)
	else:
		print('No')
	exit()
if 1 < x < 2 * N - 1:
	print('Yes')
	if x == 2:
		E = [3, 1, 2, 4]
	else:
		E = [x - 1, x + 1, x, x - 2]
	P = [i for i in list(range(1, N * 2)) if i not in E]
	P = P[:N - 3] + E + P[N - 3:]
	for p in P:
		print(p)
else:
	print('No')


(n, x) = map(int, input().split())
l = 2 * n - 1
d = n - x
if 2 <= x <= l - 1:
	print('Yes')
	ans = []
	for i in range(l):
		ans.append((l - d + i) % l + 1)
	for i in ans:
		print(i)
else:
	print('No')


(N, x) = map(int, input().split())
if x in [1, 2 * N - 1]:
	print('No')
else:
	print('Yes')
	center = {x - 1, x, x + 1}
	others = sorted(set(range(1, 2 * N)) - center)
	ans = others[N - 2:] + list(center) + others[:N - 2]
	print(*ans, sep='\n')


def main():
	(N, X) = map(int, input().split())
	if 1 < X < 2 * N - 1:
		print('Yes')
		ans = list(range(1, 2 * N))
		print('\n'.join(map(str, ans[X - N:] + ans[:X - N])))
	else:
		print('No')
main()


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	(l, r) = ([1], [2 * N - 1])
	i = 2 * N - 2
	while len(l) < N - 1:
		if i != x:
			l.append(i)
		i -= 1
	i = 2
	while len(r) < N - 1:
		if i != x:
			r.append(i)
		i += 1
	for i in l[::-1] + [x] + r:
		print(i)


import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
	(n, x) = map(int, readline().split())
	ans = [0] * (2 * n - 1)
	if x == 1 or x == 2 * n - 1:
		print('No')
		return
	for i in range(1, n + 1):
		if i % 2 == 1:
			ans[i - 1] = (x - 1 + abs(n - i)) % (2 * n - 1) + 1
		else:
			ans[i - 1] = (x - 1 - abs(n - i)) % (2 * n - 1) + 1
	ans[n] = x
	for i in range(n + 1, 2 * n):
		if i % 2 == 0:
			ans[i - 1] = (x - 1 + abs(n - i)) % (2 * n - 1) + 1
		else:
			ans[i - 1] = (x - 1 - abs(n - i)) % (2 * n - 1) + 1
	print('Yes')
	print(*ans, sep='\n')
main()


(N, X) = map(int, input().split())
if X in [1, 2 * N - 1]:
	print('No')
	quit()
T = list(range(X + 2, 2 * N)) + list(reversed(range(1, X - 1)))
A = T[:N - 2] + [X - 1, X, X + 1] + T[N - 2:]
print('Yes')
print(*A, sep='\n')


(N, K) = map(int, input().split())
m = 2 * N - 1
if 2 <= K < m:
	mid = list((3, 2, 1) if K == 2 else (K - 1, K, K + 1, K - 2))
	a = list(set(range(1, m + 1)) - set(mid))
	print('Yes\n' + '\n'.join(map(str, a[:m // 2 - 1] + mid + a[m // 2 - 1:])))
else:
	print('No')


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
else:
	print('Yes')
	if N == 2:
		for i in range(3):
			print(i + 1)
		exit()
	count = 0
	for i in range(2, 2 * N - 1):
		if i == x:
			continue
		else:
			print(i)
			count += 1
		if count == N - 1:
			if x > N:
				print(2 * N - 1)
				print(x)
				print(1)
			else:
				print(1)
				print(x)
				print(2 * N - 1)


(N, x) = map(int, input().split())
S = 2 * N - 1
if 1 < x < S:
	print('Yes')
	print(*[(a + x - N) % S + 1 for a in range(S)], sep='\n')
else:
	print('No')


(N, x) = map(int, input().split())
if x in (1, 2 * N - 1):
	print('No')
else:
	print('Yes')
	ans = list(range(1, 2 * N))
	st = (x - N) % (2 * N - 1)
	print('\n'.join(map(str, ans[st:] + ans[:st])))


(n, x) = map(int, input().split())
if x in (1, 2 * n - 1):
	print('No')
	exit()
res = [i for i in range(1, 2 * n)]
flag = False
if x > n:
	x = 2 * n - x
	flag = True
res = res[x - n:] + res[:x - n]
if flag:
	for i in range(2 * n - 1):
		res[i] = 2 * n - res[i]
print('Yes')
print(*res, sep='\n')


def getlist():
	return list(map(int, input().split()))
(N, x) = getlist()
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	L = [i for i in range(1, 2 * N)]
	b = [2 * N - 1, x, 1]
	L.remove(2 * N - 1)
	L.remove(x)
	L.remove(1)
	a = L[:N - 2]
	c = L[N - 2:]
	a.reverse()
	c.reverse()
	ans = a + b + c
	for i in range(2 * N - 1):
		print(ans[i])


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
print('Yes')
r = [x - 1, x, x + 1]
tmp = list(range(1, x - 1)) + list(range(x + 2, 2 * n))
ans = tmp[:n - 2] + r + tmp[n - 2:]
for i in ans:
	print(i)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
elif N == 2:
	print('Yes')
	for i in range(1, 4):
		print(i)
else:
	lst = [0 for i in range(2 * N - 1)]
	nlst = set([i for i in range(1, 2 * N)])
	if x >= N:
		lst[N - 1] = x
		lst[N] = x + 1
		lst[N + 1] = x - 1
		lst[N - 2] = x - 2
		nlst.remove(x)
		nlst.remove(x + 1)
		nlst.remove(x - 1)
		nlst.remove(x - 2)
	else:
		lst[N - 1] = x
		lst[N] = x - 1
		lst[N + 1] = x + 1
		lst[N - 2] = x + 2
		nlst.remove(x)
		nlst.remove(x - 1)
		nlst.remove(x + 1)
		nlst.remove(x + 2)
	idxlst = set([i for i in range(2 * N - 1)])
	idxlst.remove(N - 2)
	idxlst.remove(N - 1)
	idxlst.remove(N)
	idxlst.remove(N + 1)
	nlst = list(nlst)
	idxlst = list(idxlst)
	for (n, i) in zip(nlst, idxlst):
		lst[i] = n
	print('Yes')
	for i in lst:
		print(i)


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		b = [1, 2, 3]
	elif x == 2:
		b = [i for i in range(2 * n - 1, n, -1)] + [i for i in range(1, n + 1)]
	elif x == 2 * n - 2:
		b = [i for i in range(n, 2 * n)] + [i for i in range(n - 1, 0, -1)]
	else:
		a = [i for i in range(1, 2 * n)]
		temp = [x + 1, x - 1, x, x + 2, x - 2]
		for t in temp:
			a.remove(t)
		b = a[:n - 2] + temp + a[n - 2:]
	for i in b:
		print(i)


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		print(1, 2, 3, sep='\n')
	else:
		L = [0] * (2 * n - 1)
		if x == 2:
			L[n - 1] = 1
			L[n] = 2
			K = [i for i in range(3, 2 * n)]
			for i in range(n - 1):
				L[i] = K.pop()
			for i in range(n + 1, 2 * n - 1):
				L[i] = K.pop()
		else:
			L[n - 1] = x
			L[n] = x + 1
			L[n - 2] = 1
			L[n + 1] = 2
			K = [i for i in range(1, 2 * n) if 3 <= i < x or i > x + 1]
			for i in range(n - 2):
				L[i] = K.pop()
			for i in range(n + 2, 2 * n - 1):
				L[i] = K.pop()
		print(*L, sep='\n')


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit(0)
if N == 2:
	print('Yes')
	print(*[1, 2, 3], sep='\n')
	exit(0)
A = [0 for k in range(2 * N - 1)]
(A[N - 2], A[N - 1], A[N]) = (x - 1, x, x + 1)
t = 1
for k in range(N - 2):
	while x - 1 <= t <= x + 1:
		t += 1
	A[k] = t
	t += 1
for k in range(N + 1, 2 * N - 1):
	while x - 1 <= t <= x + 1:
		t += 1
	A[k] = t
	t += 1
print('Yes')
print(*A, sep='\n')


(n, x) = map(int, input().split())
if (x == 1) | (x == 2 * n - 1):
	print('No')
	exit()
if n == 2:
	print('Yes')
	print('\n'.join(map(str, [1, 2, 3])))
	exit()
m = 2 * n - 1
ans = list(range(1, m + 1))
ans = ans + ans
center = m // 2
if x - 1 < center:
	ans = ans[m + x - 1 - center:m + m + x - 1 - center]
else:
	ans = ans[x - 1 - center:m + x - 1 - center]
if not (x == 2) | (x == m - 1):
	(ans[center - 2], ans[center + 2]) = (ans[center + 2], ans[center - 2])
print('Yes')
print('\n'.join(map(str, ans)))


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
elif n == x:
	print('Yes')
	for i in range(1, 2 * n):
		print(i)
else:
	print('Yes')
	a = list(range(1, x - 1))
	a.extend(list(range(x + 2, 2 * n)))
	a.insert(n - 2, x + 1)
	a.insert(n - 1, x)
	a.insert(n, x - 1)
	for i in a:
		print(i)


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
if n == 2:
	print('Yes')
	print(1)
	print(2)
	print(3)
	exit()
ret = [0 for _ in range(2 * n - 1)]
if x != 2:
	ret[n - 1 - 1] = x - 1
	ret[n - 1] = x
	ret[n + 1 - 1] = x + 1
	ret[n + 2 - 1] = x - 2
	d = [x - 2, x - 1, x, x + 1]
else:
	ret[n - 1 - 1] = x + 1
	ret[n - 1] = x
	ret[n + 1 - 1] = x - 1
	ret[n + 2 - 1] = x + 2
	d = [x - 1, x, x + 1, x + 2]
i = 0
j = 1
while i < 2 * n - 1:
	if ret[i] == 0:
		while j in d:
			j += 1
		ret[i] = j
		j += 1
	i += 1
print('Yes')
for x in ret:
	print(x)


from sys import exit, setrecursionlimit, stderr
from functools import reduce
from itertools import *
from collections import defaultdict
from bisect import bisect
from random import *

def read():
	return int(input())

def reads():
	return [int(x) for x in input().split()]
(N, x) = reads()
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
zs = [i for i in range(2, 2 * N - 1) if i != x]
for z in chain(zs[:N - 2], [1, x, 2 * N - 1], zs[N - 2:]):
	print(z)


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	m = [x - 1, x, x + 1]
	i = 1
	for _ in range(n - 2):
		while i in m:
			i += 1
		print(i)
		i += 1
	for mi in m:
		print(mi)
	for _ in range(n - 2):
		while i in m:
			i += 1
		print(i)
		i += 1


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	if N == 2:
		li = [1, 2, 3]
	else:
		s = set([i for i in range(1, 2 * N)])
		li = [0] * (2 * N - 1)
		if x == 2:
			li[N - 2] = x + 1
			li[N - 1] = x
			li[N] = x - 1
			li[N + 1] = x + 2
			s -= set([x - 1, x, x + 1, x + 2])
		else:
			li[N - 2] = x - 1
			li[N - 1] = x
			li[N] = x + 1
			li[N + 1] = x - 2
			s -= set([x - 2, x - 1, x, x + 1])
		for i in range(2 * N - 1):
			if li[i] == 0:
				li[i] = s.pop()
	for i in li:
		print(i)


import math
import fractions
import heapq
import collections
import re
import array
import bisect
from collections import Counter, defaultdict
II = lambda : int(input())
MI = lambda : map(int, input().split())

def main():
	(N, x) = MI()
	if x in [1, 2 * N - 1]:
		print('No')
		return
	print('Yes')
	if N == 2:
		print('1\n2\n3')
		return
	s = set([i for i in range(1, 2 * N)])
	a = [None] * (2 * N - 1)
	MED = N - 1
	if x == 2 * N - 2:
		l = (x - 1, x, x + 1, x - 2)
		a[MED - 1:MED + 3] = l
		for i in l:
			s.remove(i)
	else:
		l = (x + 1, x, x - 1, x + 2)
		a[MED - 1:MED + 3] = l
		for i in l:
			s.remove(i)
	for i in range(2 * N - 1):
		if a[i] is None:
			a[i] = s.pop()
	for i in range(2 * N - 1):
		print(a[i])
main()


import sys
stdin = sys.stdin

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

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

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

def ls():
	return stdin.readline().split()

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

def lc():
	return list(ns())

def ni():
	return int(ns())

def nf():
	return float(ns())
(n, x) = li()
if n == 2 and x == 2:
	print('Yes')
	for i in range(1, 4):
		print(i)
elif n == 2 and x == 1 or (n == 2 and x == 3):
	print('No')
elif x == 1 or x == 2 * n - 1:
	print('No')
elif x == 2:
	ans = [i for i in range(1, x - 1)] + [i for i in range(x + 3, 2 * n)]
	ans = ans[:n - 2] + [x + 2, x, x - 1, x + 1] + ans[n - 2:]
	print('Yes')
	for ai in ans:
		print(ai)
else:
	ans = [i for i in range(1, x - 2)] + [i for i in range(x + 2, 2 * n)]
	ans = ans[:n - 2] + [x - 1, x, x + 1, x - 2] + ans[n - 2:]
	print('Yes')
	for ai in ans:
		print(ai)


import sys
stdin = sys.stdin
ri = lambda : int(rs())
rl = lambda : list(map(int, stdin.readline().split()))
rs = lambda : stdin.readline().rstrip()
(N, x) = rl()
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
answer = [0] * (2 * N - 1)
mid = N - 1
if x <= N:
	answer[mid] = x
	answer[mid - 1] = x - 1
	cur = 0
	for y in range(2 * N - 1, 0, -1):
		while cur == mid or cur == mid - 1:
			cur += 1
		if y == x or y == x - 1:
			continue
		answer[cur] = y
		cur += 1
else:
	answer[mid] = x
	answer[mid - 1] = x + 1
	cur = 0
	for y in range(1, 2 * N):
		while cur == mid or cur == mid - 1:
			cur += 1
		if y == x or y == x + 1:
			continue
		answer[cur] = y
		cur += 1
print('Yes')
print(*answer)


(N, x) = map(int, input().split())
n = 2 * N - 1
if x == 1 or x == n:
	print('No')
	exit()
elif N == 2:
	print('Yes')
	print('\n'.join(map(str, [1, 2, 3])))
	exit()
n = n // 2 + 1
N *= 2
answer = [0] * N
if x == N - 2:
	answer[n] = x
	answer[n + 1] = x + 1
	answer[n + 2] = x - 1
	answer[n - 1] = x - 2
	numbers = list(range(1, x - 2)) + list(range(x + 2, N))
else:
	answer[n] = x
	answer[n + 1] = x - 1
	answer[n + 2] = x + 2
	answer[n - 1] = x + 1
	numbers = list(range(1, x - 1)) + list(range(x + 3, N))
for i in range(1, N):
	if answer[i] == 0:
		answer[i] = numbers.pop()
print('Yes')
print('\n'.join(map(str, answer[1:])))


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	center = [x - 1, x, x + 1]
	left = list(range(1, x - 1))
	right = list(range(x + 2, 2 * N))
	others = left + right
	ans = others[N - 2:] + center + others[:N - 2]
	print(*ans, sep='\n')


(N, x) = map(int, input().split())
if 2 * N - x > 2 and x > 2 and (N > 2):
	print('Yes')
	ans = [x - 2, x + 1, x, x - 1, x + 2]
	ls = []
	for i in range(1, 2 * N):
		if i in ans:
			continue
		ls += [i]
	ans = ls[:len(ls) // 2] + ans + ls[len(ls) // 2:]
	print('\n'.join(map(str, ans)))
elif 2 * N - x > 2 and x > 1 and (N > 2):
	print('Yes')
	ans = [x + 1, x, x - 1, x + 2]
	ls = []
	for i in range(1, 2 * N):
		if i in ans:
			continue
		ls += [i]
	ans = ls[:len(ls) // 2 + 1] + ans + ls[len(ls) // 2 + 1:]
	print('\n'.join(map(str, ans)))
elif 2 * N - x > 1 and x > 2 and (N > 2):
	print('Yes')
	ans = [x - 1, x, x + 1, x - 2]
	ls = []
	for i in range(1, 2 * N):
		if i in ans:
			continue
		ls += [i]
	ans = ls[:len(ls) // 2 + 1] + ans + ls[len(ls) // 2 + 1:]
	print('\n'.join(map(str, ans)))
elif N == 2:
	if x == 2:
		print('Yes')
		print(1, 2, 3, sep='\n')
	else:
		print('No')
else:
	print('No')


(n, x) = [int(v) for v in input().split()]
if x in [1, 2 * n - 1]:
	print('No')
else:
	print('Yes')
	ans_list = [None for i in range(2 * n - 1)]
	num_list = [i + 1 for i in range(2 * n - 1)]
	for i in range(3):
		ans_list[n - 2 + i] = x - 1 + i
		num_list[x - 2 + i] = None
	if x > n:
		ans_list[n + 1] = 1
		num_list[0] = None
	elif x < n:
		ans_list[n - 3] = 2 * n - 1
		num_list[2 * n - 2] = None
	num_list = [i for i in num_list if i != None]
	t = 0
	for i in ans_list:
		if i == None:
			print(num_list[t])
			t += 1
		else:
			print(i)


(N, x) = [int(_) for _ in input().split()]
A = list(range(N + 1, 2 * N)) + list(range(1, N + 1))
if x in [1, 2 * N - 1]:
	print('No')
else:
	print('Yes')
	if x > N:
		(A[x - N - 1], A[N - 1]) = (A[N - 1], A[x - N - 1])
	else:
		(A[x + N - 2], A[N - 1]) = (A[N - 1], A[x + N - 2])
	print(*A, sep='\n')


(N, X) = map(int, input().split())
if X == 1 or X == 2 * N - 1:
	print('No')
	exit()
print('Yes')
if N == 2:
	print('1\n2\n3')
	exit()
P = [0] * (2 * N - 1)
P[N - 1] = X
P[N - 2] = X - 1
P[N] = X + 1
P[N + 1] = 1
if X == 2:
	P[N - 2] = X + 1
	P[N] = 1
	P[N + 1] = X + 2
S = set(P)
Z = 2
for i in range(2 * N - 1):
	if P[i]:
		continue
	while Z in S:
		Z += 1
	P[i] = Z
	S.add(Z)
	Z += 1
print(*P, sep='\n')


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	if n == 2:
		print(1)
		print(2)
		print(3)
	else:
		a = [0 for i in range(2 * n - 1)]
		if x == 2 * n - 2:
			a[n - 3] = x - 2
			a[n - 2] = x + 1
			a[n - 1] = x
			a[n] = x - 1
		else:
			a[n - 3] = x + 1
			a[n - 2] = x - 1
			a[n - 1] = x
			a[n] = x + 2
		y = 1
		for i in range(2 * n - 1):
			if y == x - 1:
				y = x + 3
			if a[i] == 0:
				a[i] = y
				y += 1
		for t in a:
			print(t)


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
if N == 2:
	print('Yes')
	print(*[1, 2, 3], sep='\n')
	exit()
s = set(range(1, 2 * N))
s.remove(x)
ans = [0] * (2 * N - 1)
ans[N - 1] = x
min1 = min(s)
max1 = max(s)
s.remove(min1)
s.remove(max1)
if x == 2 * N - 2:
	min2 = min(s)
	s.remove(min2)
	ans[N - 2] = min1
	ans[N] = max1
	ans[N + 1] = min2
else:
	max2 = max(s)
	s.remove(max2)
	ans[N - 2] = max1
	ans[N] = min1
	ans[N + 1] = max2
li = list(s)
for i in range(2 * N - 1):
	if ans[i] == 0:
		ans[i] = li.pop()
print('Yes')
print(*ans, sep='\n')


import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

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

def INT():
	return int(input())

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

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

def ZIP(n):
	return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
(N, x) = MAP()
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	ans = deque([1, x, 2 * N - 1])
	for i in range(2, 2 * N - 1):
		if i == x:
			continue
		if (i + (x != 2 * N - 2)) % 2:
			ans.append(i)
		else:
			ans.appendleft(i)
	print(*ans, sep='\n')


def main():
	(N, x) = map(int, input().split())
	if x <= 1 or 2 * N - 1 <= x:
		print('No')
	else:
		ans = [(x + i + N - 1) % (2 * N - 1) + 1 for i in range(2 * N - 1)]
		print('Yes')
		print(*ans, sep='\n')
main()


def main():
	(n, x) = map(int, input().split())
	if x == 1 or x == 2 * n - 1:
		print('No')
	else:
		print('Yes')
		numbers = [i for i in range(1, 2 * n - 1 + 1) if i < x - 1 or x + 1 < i]
		half = n - 2
		for ans in numbers[:half] + [x - 1, x, x + 1] + numbers[half:]:
			print(ans)
main()


import sys
readline = sys.stdin.readline
(N, x) = map(int, readline().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit(0)
elif x == N:
	A = [i + 1 for i in range(2 * N - 1)]
elif x < N:
	A = [0 for i in range(2 * N - 1)]
	A[N - 1] = x
	A[N - 2] = 1
	ind = 0
	for num in range(2, 2 * N):
		if num in (1, x):
			continue
		if A[ind] != 0:
			ind += 2
		A[ind] = num
		ind += 1
elif x > N:
	A = [0 for i in range(2 * N - 1)]
	A[N - 1] = x
	A[N] = 2 * N - 1
	ind = 0
	for num in range(1, 2 * N):
		if num in (x, 2 * N - 1):
			continue
		if A[ind] != 0:
			ind += 2
		A[ind] = num
		ind += 1
print('Yes')
for a in A:
	print(a)


(N, X) = map(int, input().split())
if X == 1 or X == 2 * N - 1:
	print('No')
	exit()
print('Yes')
ans = [None] * (2 * N - 1)
ans[N - 2] = X - 1
ans[N - 1] = X
ans[N] = X + 1
a = 1
for i in range(2 * N - 1):
	if ans[i]:
		continue
	if a == X - 1:
		a += 3
	ans[i] = a
	a += 1
print(*ans, sep='\n')


(n, x) = map(int, input().split())
if n >= 3:
	if 1 < x < 2 * n - 1:
		print('Yes')
		A = [0] * (2 * n - 1)
		V = [0] * (2 * n - 1 + 1)
		A[n - 1] = x
		A[n - 2] = x - 1
		A[n] = x + 1
		V[x - 1] = 1
		V[x] = 1
		V[x + 1] = 1
		if x == 2:
			A[n - 3] = x + 2
			V[x + 2] = 1
		else:
			A[n + 1] = x - 2
			V[x - 2] = 1
		j = 0
		for i in range(1, 2 * n - 1 + 1):
			while j < 2 * n - 1 and A[j] != 0:
				j += 1
			if V[i] == 0:
				A[j] = i
		for i in A:
			print(i)
	else:
		print('No')
elif n == 2 and x == 2:
	print('Yes')
	print(1)
	print(2)
	print(3)
else:
	print('No')


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
else:
	print('Yes')
	l = [i for i in range(1, 2 * n)]
	l.remove(x - 1)
	l.remove(x)
	l.remove(x + 1)
	j = 0
	for i in range(n - 2):
		print(l[i])
	print(x - 1)
	print(x)
	print(x + 1)
	for i in range(n - 2):
		print(l[n - 2 + i])


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	k = 2
	c = 0
	while c <= N - 3:
		if k != x:
			print(k)
			c += 1
		k += 1
	print(1)
	print(x)
	print(2 * N - 1)
	while c <= 2 * N - 5:
		if k != x:
			print(k)
			c += 1
		k += 1


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	if N == 2:
		print(*range(1, 2 * N), sep='\n')
	else:
		if x == 2:
			not_use = list(range(5, 2 * N))
			ans = not_use[::2]
			ans += [3, 2, 1, 4]
			ans += not_use[1::2]
		else:
			not_use = list(range(1, x - 2)) + list(range(x + 2, 2 * N))
			ans = not_use[::2]
			ans += [x - 1, x, x + 1, x - 2]
			ans += not_use[1::2]
		print(*ans, sep='\n')


(n, x) = map(int, input().split())
m = 2 * n - 1
if n == 2 and x == 2:
	print('Yes')
	print('1\n2\n3')
elif x == 1 or x == m:
	print('No')
elif x < n:
	print('Yes')
	base = [str(i) for i in [m, x, 1, m - 1]]
	ans = [str(i) for i in range(2, n) if i != x] + base + [str(i) for i in range(n, m - 1)]
	print('\n'.join(ans))
else:
	print('Yes')
	base = [str(i) for i in [1, x, m, 2]]
	ans = [str(i) for i in range(3, n)] + base + [str(i) for i in range(n, m) if i != x]
	print('\n'.join(ans))


from collections import deque
(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
if N == 2:
	print('Yes')
	print(*[1, 2, 3], sep='\n')
	exit()
d = deque(list(range(1, x)) + list(range(x + 1, 2 * N)))
ans = [0] * (2 * N - 1)
ans[N - 1] = x
(ans[N - 2], ans[N]) = [d.popleft(), d.pop()] if x > 2 else [d.pop(), d.popleft()]
ans[N + 1] = d.popleft() if N > 2 else d.pop()
for i in range(2 * N - 1):
	if ans[i] == 0:
		ans[i] = d.pop()
print('Yes')
print(*ans, sep='\n')


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
print('Yes')
l = list(range(1, 2 * n))
l = l[-n + x:] + l[:-n + x]
print(*l, sep='\n')


str = input().split()
N = int(str[0])
x = int(str[1])
if N - (N - 2) <= x <= N + (N - 2):
	print('Yes')
	arr = [0] * (2 * N - 1)
	for i in range(2 * N - 1):
		arr[i] = i

	def flip(a, b):
		(arr[a], arr[b]) = (arr[b], arr[a])
	if x != N:
		flip(x - 1, N - 1)
		if x < N:
			flip(0, N)
		else:
			flip(2 * N - 1 - 1, N - 2)
	for i in range(2 * N - 1):
		print(arr[i] + 1)
else:
	print('No')


from collections import deque
(N, x) = list(map(int, input().split()))
if x == 2 * N - 1 or x == 1:
	print('No')
else:
	Q = deque()
	if x <= N:
		Q.append(x)
		Q.append(x - 1)
		for i in range(2 * N - 1, 0, -1):
			if i != x and i != x - 1:
				if i % 2 == 0:
					Q.append(i)
				else:
					Q.appendleft(i)
	else:
		Q.append(x)
		Q.append(x + 1)
		for i in range(1, 2 * N):
			if i != x and i != x + 1:
				if i % 2 == 0:
					Q.append(i)
				else:
					Q.appendleft(i)
	print('Yes')
	while len(Q) > 0:
		print(Q.pop())


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
	exit()
print('Yes')
if N == 2:
	print(1)
	print(2)
	print(3)
	exit()
ans = [-1] * (2 * N - 1)
if x == 2:
	ans[N - 2:N + 2] = [3, 2, 1, 4]
	tmp = 5
	for i in range(2 * N - 1):
		if ans[i] != -1:
			continue
		else:
			ans[i] = tmp
			tmp += 1
else:
	ans[N - 2:N + 2] = [x - 1, x, x + 1, x - 2]
	tmp = x + 2
	for i in range(2 * N - 1):
		if ans[i] != -1:
			continue
		else:
			if tmp >= 2 * N:
				tmp = 1
			ans[i] = tmp
			tmp += 1
for a in ans:
	print(a)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 10
mod = 10 ** 9 + 7

def f():
	r = []
	(n, x) = list(map(int, input().split()))
	nn = n * 2
	if x < 2 or x > nn - 2:
		return 'No'
	print('Yes')
	r = list(range(1, nn))
	(r[n - 1], r[x - 1]) = (r[x - 1], r[n - 1])
	(r[n - 2], r[0]) = (r[0], r[n - 2])
	(r[n], r[-1]) = (r[-1], r[n])
	return ' '.join(map(str, r))
print(f())


(n, x) = map(int, input().split())
if x == 1 or x == 2 * n - 1:
	print('No')
	exit()
from collections import deque
ll = deque()
for i in range(n + 1, 2 * n):
	if x != i and len(ll) < n:
		ll.append(i)
ll.append(x)
for i in range(1, n):
	if x != i:
		ll.append(i)
if x < n:
	ll.append(n)
elif x > n:
	ll.appendleft(n)
print('Yes')
for i in ll:
	print(i)


(N, X) = map(int, input().split())
if X == 1 or X == 2 * N - 1:
	print('No')
	exit()
A = [0] * (2 * N - 1)
D = [i + 1 for i in range(2 * N - 1)]
if X == 2:
	A[N - 2] = X
	A[N - 1] = X - 1
else:
	A[N - 2] = X
	A[N - 1] = X + 1
	A[N] = X - 1
	D.remove(X)
	D.remove(X + 1)
	D.remove(X - 1)
	if N >= 3:
		A[N - 3] = X - 2
		D.remove(X - 2)
for i in range(2 * N - 1):
	if A[i] == 0:
		A[i] = D.pop()
print('Yes')
for a in A:
	print(a)


(N, X) = map(int, input().split())
if N == 2:
	if X != 2:
		print('No')
	else:
		print('Yes')
		print(1)
		print(2)
		print(3)
elif X == 1 or X == 2 * N - 1:
	print('No')
else:
	print('Yes')
	used = [False] * (2 * N - 1)
	if X >= N:
		p1 = 2 * N - 1
		s1 = 1
		s2 = 2
	else:
		p1 = 1
		s1 = 2 * N - 1
		s2 = 2 * N - 2
	a = 0
	for k in range(1, 2 * N):
		if a == N - 2:
			print(s1)
			print(X)
			print(p1)
			print(s2)
			a += 4
		if k in [X, p1, s1, s2]:
			continue
		print(k)
		a += 1


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	A = [0 for _ in range(2 * N - 1)]
	hist = [0 for _ in range(2 * N)]
	A[N - 1] = x
	A[N - 2] = x - 1
	A[N] = x + 1
	hist[x] = 1
	hist[x - 1] = 1
	hist[x + 1] = 1
	if x > 2:
		cur = 1
	else:
		cur = 4
	for i in range(2 * N - 1):
		if i < N - 2 or i > N:
			while hist[cur] == 1:
				cur += 1
			A[i] = cur
			hist[cur] = 1
			cur += 1
	for i in range(2 * N - 1):
		print(A[i])


(N, x) = map(int, input().split())
if x == 1 or x == 2 * N - 1:
	print('No')
else:
	print('Yes')
	ans = [int(x + 1) for x in range(2 * N - 1)]
	if N - x > 0:
		cnt = abs(N - x)
		ans = ans[2 * N - 1 - cnt:] + ans[:2 * N - 1 - cnt]
	elif N - x < 0:
		cnt = abs(N - x)
		ans = ans[cnt:] + ans[:cnt]
	for i in range(2 * N - 1):
		print(ans[i])


(n, x) = map(int, input().split())
if x in (1, 2 * n - 1):
	print('No')
	exit()
res = list(range(1, 2 * n))
res = res[x - n:] + res[:x - n]
print('Yes')
print(*res, sep='\n')


def b_median_pyramid_easy(N, X):
	if X in [1, 2 * N - 1]:
		return 'No'
	if N == 2:
		return 'Yes\n1\n2\n3'
	ans_seq = [k for k in range(1, 2 * N)]
	if X == 2:
		tmp = [k for k in range(1, X - 1)] + [k for k in range(X + 3, 2 * N)]
		center = [X + 1, X, X - 1, X + 2]
	else:
		tmp = [k for k in range(1, X - 2)] + [k for k in range(X + 2, 2 * N)]
		center = [X - 1, X, X + 1, X - 2]
	ans_seq = tmp[:N - 2] + center + tmp[N - 2:]
	ans = 'Yes\n' + '\n'.join(map(str, ans_seq))
	return ans
(N, X) = [int(i) for i in input().split()]
print(b_median_pyramid_easy(N, X))


(n, x) = map(int, input().split())
if x == 1 or x == n * 2 - 1:
	print('No')
else:
	print('Yes')
	ans = [0] * (n * 2 - 1)
	used = [False] * (n * 2)
	mid = n - 1
	ans[mid] = x
	used[x] = True
	if x == 2:
		ans[mid - 1] = 3
		ans[mid + 1] = 1
		used[1] = used[3] = True
	else:
		ans[mid - 1] = 1
		ans[mid + 1] = n * 2 - 1
		ans[mid + 2] = 2
		used[1] = used[2] = used[n * 2 - 1] = True
	num = 1
	for i in range(n * 2 - 1):
		while num < n * 2 and used[num]:
			num += 1
		if ans[i] == 0:
			ans[i] = num
			used[num] = True
	print(*ans)