require 'set'
n = gets.to_i
a = gets.split.map(&:to_i)
q = gets.to_i
b = gets.split.map(&:to_i)
max = b.max
set = Set.new
a.each do |x|
  new_set = Set.new
  new_set << x
  set.each do |y|
    new_set << y
    new_set << x + y if x + y <= max
  end
  set = new_set
end
b.each do |x|
  puts set.include?(x) ? 'yes' : 'no'
end
