import itertools as ite

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

for i in range(n):
    for j in list(ite.combinations(a,i+1)):
        x.append(sum(j))
for i in range(q):
    flag = 0
    for j in x:
        if m[i] == j:
            print("yes")
            flag = 1
            break
    if flag == 0: print("no")

 import itertools as ite 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 x = [] x [] for i in range(n):
    for j in list(ite.combinations(a,i+1)):
        x.append(sum(j)) i range(n) range n for j in list(ite.combinations(a,i+1)):
        x.append(sum(j)) j list(ite.combinations(a,i+1)) list ite.combinations(a,i+1) ite.combinations ite combinations a i+1 i 1 x.append(sum(j)) x.append x append sum(j) sum j for i in range(q):
    flag = 0
    for j in x:
        if m[i] == j:
            print("yes")
            flag = 1
            break
    if flag == 0: print("no") i range(q) range q flag = 0 flag 0 for j in x:
        if m[i] == j:
            print("yes")
            flag = 1
            break
     j x if m[i] == j:
            print("yes")
            flag = 1
            break
     m[i] == j m[i] m i j print("yes") print "yes" flag = 1 flag 1 break if flag == 0: print(" flag == 0 flag 0 flag = 1 1 flag a = list(map(int,input().split())) list(map(int,input().split())) a q = int(input()) int(input()) q x = [] [] x m = list(map(int,input().split())) list(map(int,input().split())) m flag = 0 0 flag n = int(input()) int(input()) n
import itertools as ite

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

for i in range(n):
    for j in list(ite.combinations(a,i+1)):
        x.append(sum(j))
for i in range(q):
    flag = 0
    for j in x:
        if m[i] == j:
            print("yes")
            flag = 1
            break
    if flag == 0: print("no")


