import itertools as it
    
n = int(input())
A = sorted(list(map(int, input().split())))
q = int(input())
m = list(map(int, input().split()))

s = set()

for i in range(n):
    li= list(it.combinations(A, i+1))
    for j in range(len(li)):
        s.add(sum(li[j]))

for k in range(q):
    print('yes' if m[k] in s else 'no') import itertools as it itertools n = int(input()) n int(input()) int input() input A = sorted(list(map(int, input().split()))) A sorted(list(map(int, input().split()))) sorted 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 s = set() s set() set for i in range(n):
    li= list(it.combinations(A, i+1))
    for j in range(len(li)):
        s.add(sum(li[j])) i range(n) range n li= list(it.combinations(A, i+1)) li list(it.combinations(A, i+1)) list it.combinations(A, i+1) it.combinations it combinations A i+1 i 1 for j in range(len(li)):
        s.add(sum(li[j])) j range(len(li)) range len(li) len li s.add(sum(li[j])) s.add s add sum(li[j]) sum li[j] li j for k in range(q):
    print('yes' if m[k] in s else 'no') k range(q) range q print('yes' if m[k] in s else 'no') print 'yes' if m[k] in s else 'no' m[k] in s m[k] m k s 'yes' 'no' q = int(input()) int(input()) q s = set() set() s m = list(map(int, input().split())) list(map(int, input().split())) m n = int(input()) int(input()) n li= list(it.combinations(A, i+1)) list(it.combinations(A, i+1)) li A = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) A
import itertools as it
    
n = int(input())
A = sorted(list(map(int, input().split())))
q = int(input())
m = list(map(int, input().split()))

s = set()

for i in range(n):
    li= list(it.combinations(A, i+1))
    for j in range(len(li)):
        s.add(sum(li[j]))

for k in range(q):
    print('yes' if m[k] in s else 'no')