N = gets.to_i
array = gets.split.map(&:to_i)
Q = gets.to_i
array_m = gets.split.map(&:to_i)

def array.can_make_number?(target_number, i = 0)
  return true if target_number == 0
  return false if i >= N
  result = self.can_make_number?(target_number, i + 1) || self.can_make_number?(target_number - self[i], i + 1)
  return result
end

array_m.each do |target_number|
  if array.can_make_number?(target_number)
    puts 'yes'
  else
    puts 'no'
  end
end

