import itertools

n = int(input())
a = list(map(int,input().split()))
q = int(input())
m = list(map(int,input().split()))

data = []
for i in itertools.product(range(2),repeat=n):
    data.append(sum([i[j]*a[j] for j in range(n)]))
    
for i in m:
    if i in data:
        print("yes")
    else:
        print("no") import itertools itertools 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 data = [] data [] for i in itertools.product(range(2),repeat=n):
    data.append(sum([i[j]*a[j] for j in range(n)]))
     i itertools.product(range(2),repeat=n) itertools.product itertools product range(2) range 2 repeat=n repeat n i[j]*a[j] for j in range(n) for j in range(n) j range(n) range n for j in range(n) i[j]*a[j] i[j] i j a[j] a j data.append(sum([i[j]*a[j] for j in range(n)])) data.append data append sum([i[j]*a[j] for j in range(n)]) sum [i[j]*a[j] for j in range(n)] for i in m:
    if i in data:
        print("yes")
    else:
        print("no") i m if i in data:
        print("yes")
    else:
        print("no") i in data i data print("yes") print "yes" print("no") print "no" m = list(map(int,input().split())) list(map(int,input().split())) m q = int(input()) int(input()) q data = [] [] data a = list(map(int,input().split())) list(map(int,input().split())) a n = int(input()) int(input()) n
import itertools

n = int(input())
a = list(map(int,input().split()))
q = int(input())
m = list(map(int,input().split()))

data = []
for i in itertools.product(range(2),repeat=n):
    data.append(sum([i[j]*a[j] for j in range(n)]))
    
for i in m:
    if i in data:
        print("yes")
    else:
        print("no")
