n = gets.to_i
a = gets.split.map(&:to_i).sort
q = gets.to_i
m = gets.split.map(&:to_i)

solve = ->(target, ar) {
  return true if ar.include?(target)
  l = ar.size - 1
  while l >= 0
    if ar[l] < target
      l.downto(1) do |i|
        return true if solve.(target - ar[i], ar[0, i])
      end
    end
    l -= 1
  end
  false
}

m.each do |target|
  puts solve.(target, a) ? "yes" : "no"
end
