#!/usr/bin/ruby

NN = ARGF.gets.chomp.to_i
AA = ARGF.gets.chomp.split.collect {|el| el.to_i}
QQ = ARGF.gets.chomp.to_i
MM = ARGF.gets.chomp.split.collect {|el| el.to_i}

#p NN, AA, QQ, MM
MMAX = 2000 + 1

$dp = Array.new(AA.size) {Array.new(MMAX)}

def search(idx, tm)
  if tm == 0
    return true
  elsif AA.size <= idx
    return false
  else
    dpv = $dp[idx][tm]
    if dpv.nil?
      if search(idx + 1, tm)
        dpv = true
      elsif search(idx + 1, tm - AA[idx])
        dpv = true
      else
        dpv = false
      end
      $dp[idx][tm] = dpv
    end
    return dpv
  end
end

MM.each do |mi|
  ans = search(0, mi)
  puts ans ? "yes" : "no"
end

