n = gets.to_i
a = gets.split.map(&:to_i)
q = gets.to_i
m = gets.split.map(&:to_i)

memo = {}

solve = ->(i, m) {
  return memo[[i, m]] if memo.has_key?([i, m])
  return true if m.zero?
  return false if i >= n or m < 0
  memo[[i, m]] = solve.(i + 1, m) or solve.(i + 1, m - a[i])
}

m.each do |target|
  puts solve.(0, target) ? "yes" : "no"
end
