def solve(i, m):
  if dp[i][m] != -1:
    return dp[i][m]

  if m == 0:
    dp[i][m] = 1
  elif i >= n:
    dp[i][m] = 0
  elif solve(i+1, m):
    dp[i][m] = 1
  elif solve(i+1, m-A[i]):
    dp[i][m] = 1
  else:
    dp[i][m] = 0

  return dp[i][m]



n = input()
A = map(int, raw_input().split())
p = input()
m = map(int, raw_input().split())

dp = [[-1 for col in range(2000)] for row in range(n+1)]

for i in range(p):
  if solve(0, m[i]):
    print 'yes'
  else:
    print 'no' def solve(i, m):
  if dp[i][m] != -1:
    return dp[i][m]

  if m == 0:
    dp[i][m] = 1
  elif i >= n:
    dp[i][m] = 0
  elif solve(i+1, m):
    dp[i][m] = 1
  elif solve(i+1, m-A[i]):
    dp[i][m] = 1
  else:
    dp[i][m] = 0

  return dp[i][m] solve if dp[i][m] != -1:
    return dp[i][m]

   dp[i][m] != -1 dp[i][m] [i] dp i m -1 return dp[i][m] dp[i][m] [i] dp i m if m == 0:
    dp[i][m] = 1
  elif i >= n:
    dp[i][m] = 0
  elif solve(i+1, m):
    dp[i][m] = 1
  elif solve(i+1, m-A[i]):
    dp[i][m] = 1
  else:
    dp[i][m] = 0

   m == 0 m 0 dp[i][m] = 1 dp[i][m] [i] dp i m 1 elif i >= n:
    dp[i][m] = 0
   i >= n i n dp[i][m] = 0 dp[i][m] [i] dp i m 0 elif solve(i+1, m):
    dp[i][m] = 1
   solve(i+1, m) solve i+1 i 1 m dp[i][m] = 1 dp[i][m] [i] dp i m 1 elif solve(i+1, m-A[i]):
    dp[i][m] = 1
   solve(i+1, m-A[i]) solve i+1 i 1 m-A[i] m A[i] A i dp[i][m] = 1 dp[i][m] [i] dp i m 1 dp[i][m] = 0 dp[i][m] [i] dp i m 0 return dp[i][m] dp[i][m] [i] dp i m i i m m n = input() n input() input A = map(int, raw_input().split()) A map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split p = input() p input() input m = map(int, raw_input().split()) m map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split [-1 for col in range(2000)] for row in range(n+1) for row in range(n+1) row range(n+1) range n+1 n 1 for row in range(n+1) [-1 for col in range(2000)] dp = [[-1 for col in range(2000)] for row in range(n+1)] dp [[-1 for col in range(2000)] for row in range(n+1)] for i in range(p):
  if solve(0, m[i]):
    print 'yes'
  else:
    print 'no' i range(p) range p if solve(0, m[i]):
    print 'yes'
  else:
    print 'no' solve(0, m[i]) solve 0 m[i] m i print print dp = [[-1 for col in range(2000)] for row in range(n+1)] [[-1 for col in range(2000)] for row in range(n+1)] dp n = input() input() n A = map(int, raw_input().split()) map(int, raw_input().split()) A p = input() input() p m = map(int, raw_input().split()) map(int, raw_input().split()) m def solve(i, m):
  if dp[i][m] != -1:
    return dp[i][m]

  if m == 0:
    dp[i][m] = 1
  elif i >= n:
    dp[i][m] = 0
  elif solve(i+1, m):
    dp[i][m] = 1
  elif solve(i+1, m-A[i]):
    dp[i][m] = 1
  else:
    dp[i][m] = 0

  return dp[i][m] def solve(i, m):
  if dp[i][m] != -1:
    return dp[i][m]

  if m == 0:
    dp[i][m] = 1
  elif i >= n:
    dp[i][m] = 0
  elif solve(i+1, m):
    dp[i][m] = 1
  elif solve(i+1, m-A[i]):
    dp[i][m] = 1
  else:
    dp[i][m] = 0

  return dp[i][m] solve
def solve(i, m):
  if dp[i][m] != -1:
    return dp[i][m]

  if m == 0:
    dp[i][m] = 1
  elif i >= n:
    dp[i][m] = 0
  elif solve(i+1, m):
    dp[i][m] = 1
  elif solve(i+1, m-A[i]):
    dp[i][m] = 1
  else:
    dp[i][m] = 0

  return dp[i][m]



n = input()
A = map(int, raw_input().split())
p = input()
m = map(int, raw_input().split())

dp = [[-1 for col in range(2000)] for row in range(n+1)]

for i in range(p):
  if solve(0, m[i]):
    print 'yes'
  else:
    print 'no'