from itertools import product

n = int(input())
A = list(map(int, input().split()))
q = int(input())
M = list(map(int, input().split()))
a_sum = set()


for a in product(*((x,0) for x in A)):
    a_sum.add(sum(a))

for m in M:
    if m in a_sum:
        print("yes")
    else:
        print("no")
 from itertools import product 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 a_sum = set() a_sum set() set for a in product(*((x,0) for x in A)):
    a_sum.add(sum(a)) a product(*((x,0) for x in A)) product *((x,0) for x in A) ((x,0) for x in A) a_sum.add(sum(a)) a_sum.add a_sum add sum(a) sum a for m in M:
    if m in a_sum:
        print("yes")
    else:
        print("no") m M if m in a_sum:
        print("yes")
    else:
        print("no") m in a_sum m a_sum print("yes") print "yes" print("no") print "no" A = list(map(int, input().split())) list(map(int, input().split())) A n = int(input()) int(input()) n q = int(input()) int(input()) q M = list(map(int, input().split())) list(map(int, input().split())) M a_sum = set() set() a_sum
from itertools import product

n = int(input())
A = list(map(int, input().split()))
q = int(input())
M = list(map(int, input().split()))
a_sum = set()


for a in product(*((x,0) for x in A)):
    a_sum.add(sum(a))

for m in M:
    if m in a_sum:
        print("yes")
    else:
        print("no")

