n = gets.to_i
a_arr = gets.split.map(&:to_i)

can_create = {0 => true}
a_arr.each do |a|
  can_create.keys.each do |k|
    can_create[k+a] = true
  end
end

q = gets.to_i
m_arr = gets.split.map(&:to_i)

m_arr.each do |m|
  puts can_create.key?(m) ? 'yes' : 'no'
end