import itertools
n=int(input())
A=[0 for i in range(n)]
A=input().split()
for i in range(n):
    A[i]=int(A[i])
q=int(input())
B=[0 for i in range(q)]
B=input().split()
C=[]
for i in range(q):
    B[i]=int(B[i])
l=[0,1]
p=[]
k=0
D=[]
for v in itertools.product(l,repeat=n):
    sum=0
    for i in range(n):
        if v[i]==1:
            sum=sum+A[i]
    D.append(sum)
    k+=1
for i in range(q):
    if B[i] in D:
        C.append("yes")
    else:
        C.append("no")
for i in range(q):
    print(C[i])
 import itertools itertools n=int(input()) n int(input()) int input() input 0 for i in range(n) for i in range(n) i range(n) range n for i in range(n) 0 A=[0 for i in range(n)] A [0 for i in range(n)] A=input().split() A input().split() ().split () input split for i in range(n):
    A[i]=int(A[i]) i range(n) range n A[i]=int(A[i]) A[i] A i int(A[i]) int A[i] A i q=int(input()) q int(input()) int input() input 0 for i in range(q) for i in range(q) i range(q) range q for i in range(q) 0 B=[0 for i in range(q)] B [0 for i in range(q)] B=input().split() B input().split() ().split () input split C=[] C [] for i in range(q):
    B[i]=int(B[i]) i range(q) range q B[i]=int(B[i]) B[i] B i int(B[i]) int B[i] B i l=[0,1] l [0,1] 0 1 p=[] p [] k=0 k 0 D=[] D [] for v in itertools.product(l,repeat=n):
    sum=0
    for i in range(n):
        if v[i]==1:
            sum=sum+A[i]
    D.append(sum)
    k+=1 v itertools.product(l,repeat=n) itertools.product itertools product l repeat=n repeat n sum=0 sum 0 for i in range(n):
        if v[i]==1:
            sum=sum+A[i]
     i range(n) range n if v[i]==1:
            sum=sum+A[i]
     v[i]==1 v[i] v i 1 sum=sum+A[i] sum sum+A[i] sum A[i] A i D.append(sum) D.append D append sum k+=1 k 1 for i in range(q):
    if B[i] in D:
        C.append("yes")
    else:
        C.append("no") i range(q) range q if B[i] in D:
        C.append("yes")
    else:
        C.append("no") B[i] in D B[i] B i D C.append("yes") C.append C append "yes" C.append("no") C.append C append "no" for i in range(q):
    print(C[i]) i range(q) range q print(C[i]) print C[i] C i A=[0 for i in range(n)] [0 for i in range(n)] A k+=1 1 k D=[] [] D p=[] [] p B=input().split() input().split() B k=0 0 k n=int(input()) int(input()) n C=[] [] C B=[0 for i in range(q)] [0 for i in range(q)] B sum=0 0 sum A=input().split() input().split() A l=[0,1] [0,1] l q=int(input()) int(input()) q sum=sum+A[i] sum+A[i] sum
import itertools
n=int(input())
A=[0 for i in range(n)]
A=input().split()
for i in range(n):
    A[i]=int(A[i])
q=int(input())
B=[0 for i in range(q)]
B=input().split()
C=[]
for i in range(q):
    B[i]=int(B[i])
l=[0,1]
p=[]
k=0
D=[]
for v in itertools.product(l,repeat=n):
    sum=0
    for i in range(n):
        if v[i]==1:
            sum=sum+A[i]
    D.append(sum)
    k+=1
for i in range(q):
    if B[i] in D:
        C.append("yes")
    else:
        C.append("no")
for i in range(q):
    print(C[i])

