n = gets.to_i
a = gets.split.map(&:to_i).sort + [Float::INFINITY]
q = gets.to_i
m = gets.split.map(&:to_i)

solve = ->(target, ar) {
  return false if ar.empty?
  return true if ar.include?(target)
  i = ar.find_index {|x| x > target}
  return false if !i or i.zero?
  solve.(target - ar[i - 1], ar[0, i - 1])
}

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