output_description: For each question _M i_, print yes or no.
input_description: In the first line _n_ is given. In the second line, _n_ integers are given. In
  the third line _q_ is given. Then, in the fourth line, _q_ integers (_M i_)
  are given.
attempt: n = int(input())
  li_in = list(map(int, input().split()))
  q = int(input())
  li_check = list(map(int, input().split()))
  
  ubd = 2000
  
  table = [False] * (ubd + 5)
  S = [0] * n
  
  
  def enum(i):
      global table
      if i == n:
          sum = 0
          for j in range(n):
              sum += li_in[j] * S[j]
          if sum <= 2000:
              table[sum] = True
      else:
          enum(i + 1)
          S[i] = 1
          enum(i + 1)
          S[i] = 0
  
  
  enum(0)
  
  for val in li_check:
      if table[val]:
          print("yes")
      else:
          print("no")
  
  
  # 失敗作: 毎回再帰で計算
  # 各回，数が一つくるごとに全探索している．
  # 時間がかかりすぎる．最初に可能な数を全て計算した上でストックし，それを各数に対して用いれば良い．
  
  # S = [0] * n
  # flag = False
  
  
  # def enum(i, val):
  #     global flag
  #     if i == n:
  #         sum = 0
  #         for j in range(n):
  #             sum += li_in[j] * S[j]
  #         if sum == val:
  #             flag = True
  #     else:
  #         enum(i + 1, val)
  #         S[i] = 1
  #         enum(i + 1, val)
  #         S[i] = 0
  
  
  # for val in li_check:
  #     flag = 0
  #     enum(0, val)
  #     if flag:
  #         print('yes')
  #     else:
  #         print('no')
  
problem_description: Exhaustive Search
  
  Write a program which reads a sequence _A_ of _n_ elements and an integer _M_
  , and outputs "yes" if you can make _M_ by adding elements in _A_ , otherwise
  "no". You can use an element only once.
  
  You are given the sequence _A_ and _q_ questions where each question contains
  _M i_.
samples: [{"input": "5\n    1 5 7 10 21\n    8\n    2 4 17 8 22 21 100 35", "output": "no\n    no\n    yes\n    yes\n    yes\n    yes\n    no\n    no"}]