from itertools import product

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

numbers = set()
for bits in product((0, 1), repeat=n):
    numbers.add(sum([a * b for a, b in zip(A, bits)]))

for m in M:
    if m in numbers:
        print('yes')
    else:
        print('no')
 from itertools import product n = int(input()) n int(input()) int input() input A = tuple(map(int, input().split(' '))) A tuple(map(int, input().split(' '))) tuple map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' q = int(input()) q int(input()) int input() input M = tuple(map(int, input().split(' '))) M tuple(map(int, input().split(' '))) tuple map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' numbers = set() numbers set() set for bits in product((0, 1), repeat=n):
    numbers.add(sum([a * b for a, b in zip(A, bits)])) bits product((0, 1), repeat=n) product (0, 1) 0 1 repeat=n repeat n a * b for a, b in zip(A, bits) for a, b in zip(A, bits) a b zip(A, bits) zip A bits for a, b in zip(A, bits) a * b a b numbers.add(sum([a * b for a, b in zip(A, bits)])) numbers.add numbers add sum([a * b for a, b in zip(A, bits)]) sum [a * b for a, b in zip(A, bits)] for m in M:
    if m in numbers:
        print('yes')
    else:
        print('no') m M if m in numbers:
        print('yes')
    else:
        print('no') m in numbers m numbers print('yes') print 'yes' print('no') print 'no' numbers = set() set() numbers M = tuple(map(int, input().split(' '))) tuple(map(int, input().split(' '))) M A = tuple(map(int, input().split(' '))) tuple(map(int, input().split(' '))) A q = int(input()) int(input()) q n = int(input()) int(input()) n
from itertools import product

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

numbers = set()
for bits in product((0, 1), repeat=n):
    numbers.add(sum([a * b for a, b in zip(A, bits)]))

for m in M:
    if m in numbers:
        print('yes')
    else:
        print('no')

