import itertools as it

n, A = int(input()), [*map(int, input().split())]
yes_nums = set()
for bools in it.product([True, False], repeat=n):
  yes_nums.add(sum(A[i] for i in range(n) if bools[i]))

_ = input()
for m in map(int, input().split()):
  print("yes" if m in yes_nums else "no") import itertools as it itertools n, A = int(input()), [*map(int, input().split())] n int(input()) int input() input A [*map(int, input().split())] *map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split yes_nums = set() yes_nums set() set for bools in it.product([True, False], repeat=n):
  yes_nums.add(sum(A[i] for i in range(n) if bools[i])) bools it.product([True, False], repeat=n) it.product it product [True, False] True False repeat=n repeat n yes_nums.add(sum(A[i] for i in range(n) if bools[i])) yes_nums.add yes_nums add sum(A[i] for i in range(n) if bools[i]) sum A[i] A i _ = input() _ input() input for m in map(int, input().split()):
  print("yes" if m in yes_nums else "no") m map(int, input().split()) map int input().split() ().split () input split print("yes" if m in yes_nums else "no") print "yes" if m in yes_nums else "no" m in yes_nums m yes_nums "yes" "no" A = int(input()), [*map(int, input().split())] [*map(int, input().split())] A n, A = int(input()), [*map(int, input().split())] int(input()) n yes_nums = set() set() yes_nums _ = input() input() _
import itertools as it

n, A = int(input()), [*map(int, input().split())]
yes_nums = set()
for bools in it.product([True, False], repeat=n):
  yes_nums.add(sum(A[i] for i in range(n) if bools[i]))

_ = input()
for m in map(int, input().split()):
  print("yes" if m in yes_nums else "no")
