n= int(input())
A = list(map(int, input().split()))
q = int(input())
Mi = map(int, input().split())
PS={}
def solve(i,m):
 if m == 0:
  return True
 if (i,m) in PS:
  return PS[(i,m)]
 if i >= n:
  return False
 res = solve(i+1, m) or solve(i + 1, m - A[i])
 PS[(i,m)] = res
 return res

for m in Mi:
 if solve(0, m):
  print("yes")
 else:
  print("no") 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 Mi = map(int, input().split()) Mi map(int, input().split()) map int input().split() ().split () input split PS={} PS {} def solve(i,m):
 if m == 0:
  return True
 if (i,m) in PS:
  return PS[(i,m)]
 if i >= n:
  return False
 res = solve(i+1, m) or solve(i + 1, m - A[i])
 PS[(i,m)] = res
 return res solve if m == 0:
  return True
  m == 0 m 0 return True True if (i,m) in PS:
  return PS[(i,m)]
  (i,m) in PS (i,m) i m PS return PS[(i,m)] PS[(i,m)] PS (i,m) i m if i >= n:
  return False
  i >= n i n return False False res = solve(i+1, m) or solve(i + 1, m - A[i]) res solve(i+1, m) or solve(i + 1, m - A[i]) solve(i+1, m) solve i+1 i 1 m solve(i + 1, m - A[i]) solve i + 1 i 1 m - A[i] m A[i] A i PS[(i,m)] = res PS[(i,m)] PS (i,m) i m res return res res i i m m for m in Mi:
 if solve(0, m):
  print("yes")
 else:
  print("no") m Mi 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 q = int(input()) int(input()) q PS={} {} PS A = list(map(int, input().split())) list(map(int, input().split())) A def solve(i,m):
 if m == 0:
  return True
 if (i,m) in PS:
  return PS[(i,m)]
 if i >= n:
  return False
 res = solve(i+1, m) or solve(i + 1, m - A[i])
 PS[(i,m)] = res
 return res def solve(i,m):
 if m == 0:
  return True
 if (i,m) in PS:
  return PS[(i,m)]
 if i >= n:
  return False
 res = solve(i+1, m) or solve(i + 1, m - A[i])
 PS[(i,m)] = res
 return res solve Mi = map(int, input().split()) map(int, input().split()) Mi
n= int(input())
A = list(map(int, input().split()))
q = int(input())
Mi = map(int, input().split())
PS={}
def solve(i,m):
 if m == 0:
  return True
 if (i,m) in PS:
  return PS[(i,m)]
 if i >= n:
  return False
 res = solve(i+1, m) or solve(i + 1, m - A[i])
 PS[(i,m)] = res
 return res

for m in Mi:
 if solve(0, m):
  print("yes")
 else:
  print("no")