# -*- coding: utf-8 -*-
from sys import stdin

n = int(stdin.readline().rstrip())
A = list(map(int,stdin.readline().split()))
q = stdin.readline().rstrip()
M = list(map(int, stdin.readline().split()))

sum_results = set()

for i in range(2 ** n):
  sum_tmp = 0
  for j in range(n):
    # print("pattern i:{} j:{} i>>j{}".format(i,j,i>>j))

    if ((i >> j) & 1):  #順に右にシフトさせ最下位bitのチェックを行う
      sum_tmp += A[j]
  else:
    sum_results.add(sum_tmp)

for m in M:
  if m in sum_results:
    print("yes")
  else:
    print("no")
 from sys import stdin n = int(stdin.readline().rstrip()) n int(stdin.readline().rstrip()) int stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip A = list(map(int,stdin.readline().split())) A list(map(int,stdin.readline().split())) list map(int,stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split q = stdin.readline().rstrip() q stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip M = list(map(int, stdin.readline().split())) M list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split sum_results = set() sum_results set() set for i in range(2 ** n):
  sum_tmp = 0
  for j in range(n):
    # print("pattern i:{} j:{} i>>j{}".format(i,j,i>>j))

    if ((i >> j) & 1):  #順に右にシフトさせ最下位bitのチェックを行う
      sum_tmp += A[j]
  else:
    sum_results.add(sum_tmp) i range(2 ** n) range 2 ** n 2 n sum_tmp = 0 sum_tmp 0 for j in range(n):
    # print("pattern i:{} j:{} i>>j{}".format(i,j,i>>j))

    if ((i >> j) & 1):  #順に右にシフトさせ最下位bitのチェックを行う
      sum_tmp += A[j]
  else:
    sum_results.add(sum_tmp) j range(n) range n if ((i >> j) & 1):  #順に右にシフトさせ最下位bitのチェックを行う
      sum_tmp += A[j]
   (i >> j) & 1 i >> j i j 1 sum_tmp += A[j] sum_tmp A[j] A j sum_results.add(sum_tmp) sum_results.add sum_results add sum_tmp for m in M:
  if m in sum_results:
    print("yes")
  else:
    print("no") m M if m in sum_results:
    print("yes")
  else:
    print("no") m in sum_results m sum_results print("yes") print "yes" print("no") print "no" A = list(map(int,stdin.readline().split())) list(map(int,stdin.readline().split())) A sum_tmp += A[j] A[j] sum_tmp sum_results = set() set() sum_results q = stdin.readline().rstrip() stdin.readline().rstrip() q n = int(stdin.readline().rstrip()) int(stdin.readline().rstrip()) n sum_tmp = 0 0 sum_tmp M = list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) M
# -*- coding: utf-8 -*-
from sys import stdin

n = int(stdin.readline().rstrip())
A = list(map(int,stdin.readline().split()))
q = stdin.readline().rstrip()
M = list(map(int, stdin.readline().split()))

sum_results = set()

for i in range(2 ** n):
  sum_tmp = 0
  for j in range(n):
    # print("pattern i:{} j:{} i>>j{}".format(i,j,i>>j))

    if ((i >> j) & 1):  #順に右にシフトさせ最下位bitのチェックを行う
      sum_tmp += A[j]
  else:
    sum_results.add(sum_tmp)

for m in M:
  if m in sum_results:
    print("yes")
  else:
    print("no")

