import itertools as it

n=int(input())
A=input().split()
q=int(input())
M=input().split()
ans=[]
cnt=0

A=list(map(int,A))
M=list(map(int,M))

for i in range(len(A)):
    Ac=list(it.combinations(A,i+1))
    for j in Ac:
        ans.append(sum(j))

for i in M:
    flag=0
    for j in ans:
        if i==j:
            print("yes")
            flag=1
            break
    if flag==0:
        print("no") import itertools as it itertools n=int(input()) n int(input()) int input() input A=input().split() A input().split() ().split () input split q=int(input()) q int(input()) int input() input M=input().split() M input().split() ().split () input split ans=[] ans [] cnt=0 cnt 0 A=list(map(int,A)) A list(map(int,A)) list map(int,A) map int A M=list(map(int,M)) M list(map(int,M)) list map(int,M) map int M for i in range(len(A)):
    Ac=list(it.combinations(A,i+1))
    for j in Ac:
        ans.append(sum(j)) i range(len(A)) range len(A) len A Ac=list(it.combinations(A,i+1)) Ac list(it.combinations(A,i+1)) list it.combinations(A,i+1) it.combinations it combinations A i+1 i 1 for j in Ac:
        ans.append(sum(j)) j Ac ans.append(sum(j)) ans.append ans append sum(j) sum j for i in M:
    flag=0
    for j in ans:
        if i==j:
            print("yes")
            flag=1
            break
    if flag==0:
        print("no") i M flag=0 flag 0 for j in ans:
        if i==j:
            print("yes")
            flag=1
            break
     j ans if i==j:
            print("yes")
            flag=1
            break
     i==j i j print("yes") print "yes" flag=1 flag 1 break if flag==0:
        print("no") flag==0 flag 0 print("no") print "no" n=int(input()) int(input()) n A=input().split() input().split() A M=input().split() input().split() M M=list(map(int,M)) list(map(int,M)) M cnt=0 0 cnt Ac=list(it.combinations(A,i+1)) list(it.combinations(A,i+1)) Ac q=int(input()) int(input()) q flag=1 1 flag flag=0 0 flag A=list(map(int,A)) list(map(int,A)) A ans=[] [] ans
import itertools as it

n=int(input())
A=input().split()
q=int(input())
M=input().split()
ans=[]
cnt=0

A=list(map(int,A))
M=list(map(int,M))

for i in range(len(A)):
    Ac=list(it.combinations(A,i+1))
    for j in Ac:
        ans.append(sum(j))

for i in M:
    flag=0
    for j in ans:
        if i==j:
            print("yes")
            flag=1
            break
    if flag==0:
        print("no")
