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

check = ->(target) {
  1.upto(n) do |i|
    a.combination(i) do |ar|
      sum = ar.inject(&:+)
      return "yes" if sum == target
    end
  end
  "no"
}

m.each {|target| puts check.(target)}
