import itertools
n = int(input())
A = list(map(int,input().split()))
q = int(input())
M = list(map(int,input().split()))

dp = []
for i in itertools.product([0, 1], repeat=n):
    tmp = 0
    for j in range(n):
        tmp += A[j] * i[j]
    dp.append(tmp)

for i in M:
    if i in dp:
        print('yes')
    else:print('no') import itertools itertools n = int(input()) n int(input()) int input() input A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input M = list(map(int,input().split())) M list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split dp = [] dp [] for i in itertools.product([0, 1], repeat=n):
    tmp = 0
    for j in range(n):
        tmp += A[j] * i[j]
    dp.append(tmp) i itertools.product([0, 1], repeat=n) itertools.product itertools product [0, 1] 0 1 repeat=n repeat n tmp = 0 tmp 0 for j in range(n):
        tmp += A[j] * i[j]
     j range(n) range n tmp += A[j] * i[j] tmp A[j] * i[j] A[j] A j i[j] i j dp.append(tmp) dp.append dp append tmp for i in M:
    if i in dp:
        print('yes')
    else:print('no') i M if i in dp:
        print('yes')
    else:print('no') i in dp i dp print('yes') print 'yes' n = int(input()) int(input()) n M = list(map(int,input().split())) list(map(int,input().split())) M tmp = 0 0 tmp tmp += A[j] * i[j] A[j] * i[j] tmp A = list(map(int,input().split())) list(map(int,input().split())) A q = int(input()) int(input()) q dp = [] [] dp
import itertools
n = int(input())
A = list(map(int,input().split()))
q = int(input())
M = list(map(int,input().split()))

dp = []
for i in itertools.product([0, 1], repeat=n):
    tmp = 0
    for j in range(n):
        tmp += A[j] * i[j]
    dp.append(tmp)

for i in M:
    if i in dp:
        print('yes')
    else:print('no')
