@cache = {}

def can_create?(a, m)
  key = a.join('-') + "_#{m}"
  return @cache[key] if @cache.key?(key)
  return true if m.zero?
  return false if a.empty?

  val = a.shift
  @cache[key] = can_create?(a.dup, m - val) || can_create?(a.dup, m)
end

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

m_arr.each do |m|
  @cache = {}
  puts can_create?(a.dup, m) ? 'yes' : 'no'
end