memo = {}
def solve(p, t):
  key = "{}:{}".format(p, t)
  if key in memo: return memo[key]
  if p >= len(A): return False
  if t == A[p]: return True
  if t <= 0: return False
  #print("({}, {})".format(p, t))

  if solve(p + 1, t):
    memo["{}:{}".format(p + 1, t)] = True
    return True
  else:
    memo["{}:{}".format(p + 1, t)] = False
    return solve(p + 1, t - A[p])

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

for t in M:
  if solve(0, t): print("yes")
  else: print("no") memo = {} memo {} def solve(p, t):
  key = "{}:{}".format(p, t)
  if key in memo: return memo[key]
  if p >= len(A): return False
  if t == A[p]: return True
  if t <= 0: return False
  #print("({}, {})".format(p, t))

  if solve(p + 1, t):
    memo["{}:{}".format(p + 1, t)] = True
    return True
  else:
    memo["{}:{}".format(p + 1, t)] = False
    return solve(p + 1, t - A[p]) solve key = "{}:{}".format(p, t) key "{}:{}".format(p, t) "{}:{}".format "{}:{}" format p t if key in memo: return memo[key]
   key in memo key memo if p >= len(A): return False
   p >= len(A) p len(A) len A if t == A[p]: return True
   t == A[p] t A[p] A p if t <= 0: return False
  #print("({}, {})".format(p, t))

   t <= 0 t 0 if solve(p + 1, t):
    memo["{}:{}".format(p + 1, t)] = True
    return True
  else:
    memo["{}:{}".format(p + 1, t)] = False
    return solve(p + 1, t - A[p]) solve(p + 1, t) solve p + 1 p 1 t memo["{}:{}".format(p + 1, t)] = True memo["{}:{}".format(p + 1, t)] memo "{}:{}".format(p + 1, t) "{}:{}".format "{}:{}" format p + 1 p 1 t True return True True memo["{}:{}".format(p + 1, t)] = False memo["{}:{}".format(p + 1, t)] memo "{}:{}".format(p + 1, t) "{}:{}".format "{}:{}" format p + 1 p 1 t False return solve(p + 1, t - A[p]) solve(p + 1, t - A[p]) solve p + 1 p 1 t - A[p] t A[p] A p p p t t 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 for t in M:
  if solve(0, t): print("yes")
  else: print("no") t M if solve(0, t): print("yes")
  else: print("no") solve(0, t) solve 0 t A = list(map(int, input().split())) list(map(int, input().split())) A M = list(map(int, input().split())) list(map(int, input().split())) M n = int(input()) int(input()) n q = int(input()) int(input()) q memo = {} {} memo def solve(p, t):
  key = "{}:{}".format(p, t)
  if key in memo: return memo[key]
  if p >= len(A): return False
  if t == A[p]: return True
  if t <= 0: return False
  #print("({}, {})".format(p, t))

  if solve(p + 1, t):
    memo["{}:{}".format(p + 1, t)] = True
    return True
  else:
    memo["{}:{}".format(p + 1, t)] = False
    return solve(p + 1, t - A[p]) def solve(p, t):
  key = "{}:{}".format(p, t)
  if key in memo: return memo[key]
  if p >= len(A): return False
  if t == A[p]: return True
  if t <= 0: return False
  #print("({}, {})".format(p, t))

  if solve(p + 1, t):
    memo["{}:{}".format(p + 1, t)] = True
    return True
  else:
    memo["{}:{}".format(p + 1, t)] = False
    return solve(p + 1, t - A[p]) solve
memo = {}
def solve(p, t):
  key = "{}:{}".format(p, t)
  if key in memo: return memo[key]
  if p >= len(A): return False
  if t == A[p]: return True
  if t <= 0: return False
  #print("({}, {})".format(p, t))

  if solve(p + 1, t):
    memo["{}:{}".format(p + 1, t)] = True
    return True
  else:
    memo["{}:{}".format(p + 1, t)] = False
    return solve(p + 1, t - A[p])

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

for t in M:
  if solve(0, t): print("yes")
  else: print("no")