gets
a = gets.split(' ').map(&:to_i)
gets
b = gets.split(' ').map(&:to_i)

b.each do |n|
  catch(:exit) {
    a.size.times do |i|
      a.permutation(i + 1) { |e|
        if e.to_a.reduce(:+) == n
          puts 'yes'
          throw :exit
        end
      }
    end
    puts 'no'
  }
end
