n = gets.to_i
a = gets.chomp.split.map(&:to_i)
q = gets.to_i
m = gets.chomp.split.map(&:to_i)
sum_list = {}

1.upto(n) do |i|
  a.combination(i).each { |c| sum_list[c.inject(&:+)] = true }
end

m.each do |key|
  puts (sum_list.has_key?(key) ? "yes" : "no")
end