$MEMOS = {}

def exhaustive_search nums, target
  return $MEMOS[[nums, target]] if $MEMOS.has_key?([nums, target])

  num_len = nums.length
  if target == 0
    return true
  else
    if target < 0 || num_len == 0
      return false
    else
      sliced_nums = nums.slice(1..(num_len - 1))
      res = exhaustive_search(sliced_nums, target - nums[0]) || exhaustive_search(sliced_nums, target)
      $MEMOS[[nums, target]] = res
      return res ? true : false
    end
  end
end

n = gets.chomp.to_i
as = gets.chomp.split(' ').map(&:to_i)
q = gets.chomp.to_i
ms = gets.chomp.split(' ').map(&:to_i)
ms.each do |m|
  puts exhaustive_search(as, m) ? 'yes' : 'no'
end
