from itertools import combinations
n=int(input())
a=list(map(int,input().split()))
q=int(input())
m=list(map(int,input().split()))

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

s=set()
for i in range(1,n+1):
    for j in combinations(a,i):
        s.add(sum(j))
for i in m:
    if i in s:
        print("yes")
    else:
        print("no")

