Buggy python submission (verdict: Time Limit Exceeded):
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 = 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[0]
                    num.pop(0)
        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[0]
                    num.pop(0)
    
        for i in range(M):
            print(ans[i])

Fixed submission:
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])

Buggy python submission (verdict: Runtime Error):
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 = 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[0]
                    num.pop(0)
        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[0]
                    num.pop(0)
    
    for i in range(M):
        print(ans[i])

Fixed submission:
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])