from itertools import product

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

A = [0]*(2**n)
c = 0
for x in product([0,1], repeat=n):
    summ = 0
    for j in range(n):
        if x[j] == 1:
            summ += a[j]
    A[c] = summ
    c+=1

for i in range(q):
    if m[i] in A:
        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 = [0]*(2**n) A [0]*(2**n) [0] 0 2**n 2 n c = 0 c 0 for x in product([0,1], repeat=n):
    summ = 0
    for j in range(n):
        if x[j] == 1:
            summ += a[j]
    A[c] = summ
    c+=1 x product([0,1], repeat=n) product [0,1] 0 1 repeat=n repeat n summ = 0 summ 0 for j in range(n):
        if x[j] == 1:
            summ += a[j]
     j range(n) range n if x[j] == 1:
            summ += a[j]
     x[j] == 1 x[j] x j 1 summ += a[j] summ a[j] a j A[c] = summ A[c] A c summ c+=1 c 1 for i in range(q):
    if m[i] in A:
        print('yes')
    else:
        print('no') i range(q) range q if m[i] in A:
        print('yes')
    else:
        print('no') m[i] in A m[i] m i A print('yes') print 'yes' print('no') print 'no' a = list(map(int, input().split())) list(map(int, input().split())) a q = int(input()) int(input()) q n = int(input()) int(input()) n A = [0]*(2**n) [0]*(2**n) A c+=1 1 c c = 0 0 c summ = 0 0 summ summ += a[j] a[j] summ m = list(map(int, input().split())) list(map(int, input().split())) m
from itertools import product

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

A = [0]*(2**n)
c = 0
for x in product([0,1], repeat=n):
    summ = 0
    for j in range(n):
        if x[j] == 1:
            summ += a[j]
    A[c] = summ
    c+=1

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