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

list = {}
1.upto(n) do |i|
  a.combination(i).each do |e|
    list[e.inject(:+)] = nil
  end
end
m.each do |e|
  puts list.key?(e) ? 'yes' : 'no'
end