def combination(arr, i, n)
  result = []
  
  if n == i
    return arr.sum
  end
  result << combination(arr.dup, i+1, n)
  arr [i] = 0
  result << combination(arr.dup, i+1, n)

  return result.flatten
end

n = gets.chomp.to_i
a = gets.split(" ").map { |x| x.chomp.to_i }
q = gets.chomp.to_i
m = gets.split(" ").map { |x| x.chomp.to_i }

result = combination(a, 0, n).uniq

m.each do |x|
  if result.include?(x)
    puts 'yes'
  else
    puts 'no'
  end
end



