import itertools

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

ANS = set()
for i in range(1,n+1):
    A_pairs = list(itertools.combinations(A, i))
    for j in range(len(A_pairs)):
        ANS.add(sum(A_pairs[j]))

for i in range(q):
    if m[i] in ANS:
        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 ANS = set() ANS set() set for i in range(1,n+1):
    A_pairs = list(itertools.combinations(A, i))
    for j in range(len(A_pairs)):
        ANS.add(sum(A_pairs[j])) i range(1,n+1) range 1 n+1 n 1 A_pairs = list(itertools.combinations(A, i)) A_pairs list(itertools.combinations(A, i)) list itertools.combinations(A, i) itertools.combinations itertools combinations A i for j in range(len(A_pairs)):
        ANS.add(sum(A_pairs[j])) j range(len(A_pairs)) range len(A_pairs) len A_pairs ANS.add(sum(A_pairs[j])) ANS.add ANS add sum(A_pairs[j]) sum A_pairs[j] A_pairs j for i in range(q):
    if m[i] in ANS:
        print('yes')
    else:
        print('no') i range(q) range q if m[i] in ANS:
        print('yes')
    else:
        print('no') m[i] in ANS m[i] m i ANS print('yes') print 'yes' print('no') print 'no' ANS = set() set() ANS n = int(input()) int(input()) n A = list(map(int, input().split())) list(map(int, input().split())) A q = int(input()) int(input()) q m = list(map(int, input().split())) list(map(int, input().split())) m A_pairs = list(itertools.combinations(A, i)) list(itertools.combinations(A, i)) A_pairs
import itertools

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

ANS = set()
for i in range(1,n+1):
    A_pairs = list(itertools.combinations(A, i))
    for j in range(len(A_pairs)):
        ANS.add(sum(A_pairs[j]))

for i in range(q):
    if m[i] in ANS:
        print('yes')
    else:
        print('no')
