from itertools import combinations

n = int(eval(input()))

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

B = set(A)

for i in range(2, n + 1):

    for C in combinations(A, i):

        B.add(sum(C))

q = int(eval(input()))

for m in map(int, input().split()):

    print(("yes" if m in B else "no"))



n = int(eval(input()))

SET1 = {0}

for a in map(int, input().split()):

    for b in tuple(SET1):

        SET1.add(a + b)

eval(input())

for m in map(int, input().split()):

    print(('yes' if m in SET1 else 'no'))

from itertools import combinations

n = int(eval(input()))
A = tuple(map(int, input().split()))
B = set(A)
for i in range(2, n + 1):
    for C in combinations(A, i):
        B.add(sum(C))
q = int(eval(input()))
for m in map(int, input().split()):
    print(("yes" if m in B else "no"))

n = int(eval(input()))
SET1 = {0}
for a in map(int, input().split()):
    for b in tuple(SET1):
        SET1.add(a + b)
eval(input())
for m in map(int, input().split()):
    print(("yes" if m in SET1 else "no"))

-from itertools import combinations - -A = tuple(map(int, input().split())) -B = set(A) -for i in range(2, n + 1): -    for C in combinations(A, i): -        B.add(sum(C)) -q = int(eval(input())) +SET1 = {0} +for a in map(int, input().split()): +    for b in tuple(SET1): +        SET1.add(a + b) +eval(input()) -    print(("yes" if m in B else "no")) +    print(("yes" if m in SET1 else "no"))