from itertools import combinations
n = int(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(input())
for m in map(int, input().split()):
    print("yes" if m in B else "no")
 from itertools import combinations n = int(input()) n int(input()) int input() input A = tuple(map(int, input().split())) A tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split B = set(A) B set(A) set A for i in range(2, n + 1):
    for C in combinations(A, i):
        B.add(sum(C)) i range(2, n + 1) range 2 n + 1 n 1 for C in combinations(A, i):
        B.add(sum(C)) C combinations(A, i) combinations A i B.add(sum(C)) B.add B add sum(C) sum C q = int(input()) q int(input()) int input() input for m in map(int, input().split()):
    print("yes" if m in B else "no") m map(int, input().split()) map int input().split() ().split () input split print("yes" if m in B else "no") print "yes" if m in B else "no" m in B m B "yes" "no" A = tuple(map(int, input().split())) tuple(map(int, input().split())) A B = set(A) set(A) B q = int(input()) int(input()) q n = int(input()) int(input()) n
from itertools import combinations
n = int(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(input())
for m in map(int, input().split()):
    print("yes" if m in B else "no")

