n = gets.to_i
nums = gets.split.map(&:to_i)
r = gets.to_i
ress = gets.split.map(&:to_i)

resdic = {}
(1..n).each do |i|
  nums.combination(i) do |array|
    resdic[array.sum] = true
  end
end
ress.each do |resnum|
  resdic[resnum] ? puts("yes") : puts("no")
end
