dp = {}

n = int(input())
a = [int(i) for i in input().split()]

q = int(input())
ms = [int(i) for i in input().split()]

def solve(i, m):
  global n, a

  if  (i, m) in dp:
    return dp[(i, m)]

  if m == 0:
    dp[(i, m)] = True
  elif n <= i:
    dp[(i, m)] = False
  elif solve(i + 1, m):
    dp[(i, m)] = True
  elif solve(i + 1, m - a[i]):
    dp[(i, m)] = True
  else:
    dp[(i, m)] = False
  
  return dp[(i, m)]

for m in ms:
  if solve(0, m):
    print('yes')
  else:
    print('no')
 dp = {} dp {} n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a = [int(i) for i in input().split()] a [int(i) for i in input().split()] q = int(input()) q int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i ms = [int(i) for i in input().split()] ms [int(i) for i in input().split()] def solve(i, m):
  global n, a

  if  (i, m) in dp:
    return dp[(i, m)]

  if m == 0:
    dp[(i, m)] = True
  elif n <= i:
    dp[(i, m)] = False
  elif solve(i + 1, m):
    dp[(i, m)] = True
  elif solve(i + 1, m - a[i]):
    dp[(i, m)] = True
  else:
    dp[(i, m)] = False
  
  return dp[(i, m)] solve global n, a if  (i, m) in dp:
    return dp[(i, m)]

   (i, m) in dp (i, m) i m dp return dp[(i, m)] dp[(i, m)] dp (i, m) i m if m == 0:
    dp[(i, m)] = True
  elif n <= i:
    dp[(i, m)] = False
  elif solve(i + 1, m):
    dp[(i, m)] = True
  elif solve(i + 1, m - a[i]):
    dp[(i, m)] = True
  else:
    dp[(i, m)] = False
  
   m == 0 m 0 dp[(i, m)] = True dp[(i, m)] dp (i, m) i m True elif n <= i:
    dp[(i, m)] = False
   n <= i n i dp[(i, m)] = False dp[(i, m)] dp (i, m) i m False elif solve(i + 1, m):
    dp[(i, m)] = True
   solve(i + 1, m) solve i + 1 i 1 m dp[(i, m)] = True dp[(i, m)] dp (i, m) i m True elif solve(i + 1, m - a[i]):
    dp[(i, m)] = True
   solve(i + 1, m - a[i]) solve i + 1 i 1 m - a[i] m a[i] a i dp[(i, m)] = True dp[(i, m)] dp (i, m) i m True dp[(i, m)] = False dp[(i, m)] dp (i, m) i m False return dp[(i, m)] dp[(i, m)] dp (i, m) i m i i m m for m in ms:
  if solve(0, m):
    print('yes')
  else:
    print('no') m ms if solve(0, m):
    print('yes')
  else:
    print('no') solve(0, m) solve 0 m print('yes') print 'yes' print('no') print 'no' n = int(input()) int(input()) n ms = [int(i) for i in input().split()] [int(i) for i in input().split()] ms q = int(input()) int(input()) q a = [int(i) for i in input().split()] [int(i) for i in input().split()] a def solve(i, m):
  global n, a

  if  (i, m) in dp:
    return dp[(i, m)]

  if m == 0:
    dp[(i, m)] = True
  elif n <= i:
    dp[(i, m)] = False
  elif solve(i + 1, m):
    dp[(i, m)] = True
  elif solve(i + 1, m - a[i]):
    dp[(i, m)] = True
  else:
    dp[(i, m)] = False
  
  return dp[(i, m)] def solve(i, m):
  global n, a

  if  (i, m) in dp:
    return dp[(i, m)]

  if m == 0:
    dp[(i, m)] = True
  elif n <= i:
    dp[(i, m)] = False
  elif solve(i + 1, m):
    dp[(i, m)] = True
  elif solve(i + 1, m - a[i]):
    dp[(i, m)] = True
  else:
    dp[(i, m)] = False
  
  return dp[(i, m)] solve dp = {} {} dp
dp = {}

n = int(input())
a = [int(i) for i in input().split()]

q = int(input())
ms = [int(i) for i in input().split()]

def solve(i, m):
  global n, a

  if  (i, m) in dp:
    return dp[(i, m)]

  if m == 0:
    dp[(i, m)] = True
  elif n <= i:
    dp[(i, m)] = False
  elif solve(i + 1, m):
    dp[(i, m)] = True
  elif solve(i + 1, m - a[i]):
    dp[(i, m)] = True
  else:
    dp[(i, m)] = False
  
  return dp[(i, m)]

for m in ms:
  if solve(0, m):
    print('yes')
  else:
    print('no')

