from itertools import combinations as comb

n=int(input())
lst=list(map(int,input().split()))

numlst=[]
for i in range(1,n+1):
    for x in comb(lst,i):
        y=sum(x)
        if not y in numlst:
            numlst.append(y)

q=int(input())
lst2=list(map(int,input().split()))
for x in lst2:
    if x in numlst : print("yes")
    else : print("no") from itertools import combinations as comb n=int(input()) n int(input()) int input() input lst=list(map(int,input().split())) lst list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split numlst=[] numlst [] for i in range(1,n+1):
    for x in comb(lst,i):
        y=sum(x)
        if not y in numlst:
            numlst.append(y) i range(1,n+1) range 1 n+1 n 1 for x in comb(lst,i):
        y=sum(x)
        if not y in numlst:
            numlst.append(y) x comb(lst,i) comb lst i y=sum(x) y sum(x) sum x if not y in numlst:
            numlst.append(y) not y in numlst y in numlst y numlst numlst.append(y) numlst.append numlst append y q=int(input()) q int(input()) int input() input lst2=list(map(int,input().split())) lst2 list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for x in lst2:
    if x in numlst : print("yes")
    else : print("no") x lst2 if x in numlst : print("yes")
    else : print("no") x in numlst x numlst lst=list(map(int,input().split())) list(map(int,input().split())) lst q=int(input()) int(input()) q n=int(input()) int(input()) n lst2=list(map(int,input().split())) list(map(int,input().split())) lst2 numlst=[] [] numlst y=sum(x) sum(x) y
from itertools import combinations as comb

n=int(input())
lst=list(map(int,input().split()))

numlst=[]
for i in range(1,n+1):
    for x in comb(lst,i):
        y=sum(x)
        if not y in numlst:
            numlst.append(y)

q=int(input())
lst2=list(map(int,input().split()))
for x in lst2:
    if x in numlst : print("yes")
    else : print("no")
