n = int(input())
s = list(map(int, input().split()))
q = int(input())
t = list(map(int, input().split()))

record = [False] * 2001
for item in s:
    for i in range(2000 - item, 0, -1):
        if record[i]:
            record[i + item] = True
    record[item] = True

for m in t:
    if record[m]:
        print('yes')
    else:
        print('no') n = int(input()) n int(input()) int input() input s = list(map(int, input().split())) s 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 t = list(map(int, input().split())) t list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split record = [False] * 2001 record [False] * 2001 [False] False 2001 for item in s:
    for i in range(2000 - item, 0, -1):
        if record[i]:
            record[i + item] = True
    record[item] = True item s for i in range(2000 - item, 0, -1):
        if record[i]:
            record[i + item] = True
     i range(2000 - item, 0, -1) range 2000 - item 2000 item 0 -1 if record[i]:
            record[i + item] = True
     record[i] record i record[i + item] = True record[i + item] record i + item i item True record[item] = True record[item] record item True for m in t:
    if record[m]:
        print('yes')
    else:
        print('no') m t if record[m]:
        print('yes')
    else:
        print('no') record[m] record m print('yes') print 'yes' print('no') print 'no' n = int(input()) int(input()) n s = list(map(int, input().split())) list(map(int, input().split())) s q = int(input()) int(input()) q t = list(map(int, input().split())) list(map(int, input().split())) t record = [False] * 2001 [False] * 2001 record
n = int(input())
s = list(map(int, input().split()))
q = int(input())
t = list(map(int, input().split()))

record = [False] * 2001
for item in s:
    for i in range(2000 - item, 0, -1):
        if record[i]:
            record[i + item] = True
    record[item] = True

for m in t:
    if record[m]:
        print('yes')
    else:
        print('no')