import itertools as it

    

n = int(eval(input()))

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

q = int(eval(input()))

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



s = set()



for i in range(n):

    li= list(it.combinations(A, i+1))

    for j in range(len(li)):

        s.add(sum(li[j]))



for k in range(q):

    print(('yes' if m[k] in s else 'no'))
from itertools import combinations



n = int(eval(input()))

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

q = int(eval(input()))

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



l = set(sum(t) for i in range(n) for t in combinations(A, i+1))



for j in m:

    print(('yes' if j in l else 'no'))

        
import itertools as it

n = int(eval(input()))
A = list(map(int, input().split()))
q = int(eval(input()))
m = list(map(int, input().split()))
s = set()
for i in range(n):
    li = list(it.combinations(A, i + 1))
    for j in range(len(li)):
        s.add(sum(li[j]))
for k in range(q):
    print(("yes" if m[k] in s else "no"))

from itertools import combinations

n = int(eval(input()))
A = list(map(int, input().split()))
q = int(eval(input()))
m = list(map(int, input().split()))
l = set(sum(t) for i in range(n) for t in combinations(A, i + 1))
for j in m:
    print(("yes" if j in l else "no"))

-import itertools as it +from itertools import combinations -s = set() -for i in range(n): -    li = list(it.combinations(A, i + 1)) -    for j in range(len(li)): -        s.add(sum(li[j])) -for k in range(q): -    print(("yes" if m[k] in s else "no")) +l = set(sum(t) for i in range(n) for t in combinations(A, i + 1)) +for j in m: +    print(("yes" if j in l else "no"))