n = int(eval(input()))

A = list(map(int,input().split()))

m = int(eval(input()))

B = list(map(int,input().split()))



def solve2(x,y):

    if x==n:

        S[y] = 1

    else:

        solve2(x+1,y)

        if y+A[x] < 2001:

            solve2(x+1,y+A[x])

            

S = [0 for i in range(2001)]



solve2(0,0)



def solve(x,y):

    if y<0:

        return False

    elif y==0:

        return True

    elif x==n:

        return False

    else:

        return solve(x+1,y) or solve(x+1,y-A[x])

    

for i in range(m):

    if (i>50 and (S[B[i]] == 1)):

        print("yes")

    elif (i>50 and (S[B[i]] == 0)):

        print("no")

    else:

        if solve(0,B[i]):

            print("yes")

        else:

            print("no")

n = int(eval(input()))

A = list(map(int,input().split()))

m = int(eval(input()))

B = list(map(int,input().split()))



T = [[0]*2001 for i in range(n)]



T[0][0] = 1

T[0][A[0]] = 1

for i in range(1,n):

    for j in range(2001):

        T[i][j] = T[i-1][j]

        if (j - A[i] >=0) and (T[i-1][j-A[i]] == 1):

            T[i][j] = 1

    

for i in range(m):

    if T[n-1][B[i]] == 1:

        print("yes")

    else:

        print("no")



n = int(eval(input()))
A = list(map(int, input().split()))
m = int(eval(input()))
B = list(map(int, input().split()))


def solve2(x, y):
    if x == n:
        S[y] = 1
    else:
        solve2(x + 1, y)
        if y + A[x] < 2001:
            solve2(x + 1, y + A[x])


S = [0 for i in range(2001)]
solve2(0, 0)


def solve(x, y):
    if y < 0:
        return False
    elif y == 0:
        return True
    elif x == n:
        return False
    else:
        return solve(x + 1, y) or solve(x + 1, y - A[x])


for i in range(m):
    if i > 50 and (S[B[i]] == 1):
        print("yes")
    elif i > 50 and (S[B[i]] == 0):
        print("no")
    else:
        if solve(0, B[i]):
            print("yes")
        else:
            print("no")

n = int(eval(input()))
A = list(map(int, input().split()))
m = int(eval(input()))
B = list(map(int, input().split()))
T = [[0] * 2001 for i in range(n)]
T[0][0] = 1
T[0][A[0]] = 1
for i in range(1, n):
    for j in range(2001):
        T[i][j] = T[i - 1][j]
        if (j - A[i] >= 0) and (T[i - 1][j - A[i]] == 1):
            T[i][j] = 1
for i in range(m):
    if T[n - 1][B[i]] == 1:
        print("yes")
    else:
        print("no")

- - -def solve2(x, y): -    if x == n: -        S[y] = 1 +T = [[0] * 2001 for i in range(n)] +T[0][0] = 1 +T[0][A[0]] = 1 +for i in range(1, n): +    for j in range(2001): +        T[i][j] = T[i - 1][j] +        if (j - A[i] >= 0) and (T[i - 1][j - A[i]] == 1): +            T[i][j] = 1 +for i in range(m): +    if T[n - 1][B[i]] == 1: +        print("yes") -        solve2(x + 1, y) -        if y + A[x] < 2001: -            solve2(x + 1, y + A[x]) - - -S = [0 for i in range(2001)] -solve2(0, 0) - - -def solve(x, y): -    if y < 0: -        return False -    elif y == 0: -        return True -    elif x == n: -        return False -    else: -        return solve(x + 1, y) or solve(x + 1, y - A[x]) - - -for i in range(m): -    if i > 50 and (S[B[i]] == 1): -        print("yes") -    elif i > 50 and (S[B[i]] == 0): -    else: -        if solve(0, B[i]): -            print("yes") -        else: -            print("no")