from itertools import product

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

cases = product([0, 1], repeat=n)

seen = set()

for case in cases:
    sum_ = 0
    for i in range(n):
        sum_ += case[i] * A[i]
    seen.add(sum_)

for target in M:
    if target in seen:
        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 cases = product([0, 1], repeat=n) cases product([0, 1], repeat=n) product [0, 1] 0 1 repeat=n repeat n seen = set() seen set() set for case in cases:
    sum_ = 0
    for i in range(n):
        sum_ += case[i] * A[i]
    seen.add(sum_) case cases sum_ = 0 sum_ 0 for i in range(n):
        sum_ += case[i] * A[i]
     i range(n) range n sum_ += case[i] * A[i] sum_ case[i] * A[i] case[i] case i A[i] A i seen.add(sum_) seen.add seen add sum_ for target in M:
    if target in seen:
        print('yes')
    else:
        print('no') target M if target in seen:
        print('yes')
    else:
        print('no') target in seen target seen print('yes') print 'yes' print('no') print 'no' seen = set() set() seen q = int(input()) int(input()) q sum_ = 0 0 sum_ A = list(map(int, input().split())) list(map(int, input().split())) A cases = product([0, 1], repeat=n) product([0, 1], repeat=n) cases n = int(input()) int(input()) n M = list(map(int, input().split())) list(map(int, input().split())) M sum_ += case[i] * A[i] case[i] * A[i] sum_
from itertools import product

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

cases = product([0, 1], repeat=n)

seen = set()

for case in cases:
    sum_ = 0
    for i in range(n):
        sum_ += case[i] * A[i]
    seen.add(sum_)

for target in M:
    if target in seen:
        print('yes')
    else:
        print('no')
