gets
arr = Array.new(2000, false)
a = gets.split(" ").map(&:to_i).sort
a.each {|item|
  arr.each_with_index{|i, idx|
    if i and idx - item >= 0
      arr[idx - item] = true
    end
  }
  arr[-item] = true
}
arr.reverse!
gets
m = gets.split(" ").map(&:to_i)
m.each{|i|
  if arr[i - 1]
    puts "yes"
  else
    puts "no"
  end
}