n = gets(chomp:true).to_i
a = gets.split.map(&:to_i)
q = gets(chomp:true).to_i
m = gets.split.map(&:to_i)

def solve(i, m, m_i, n, a, q)

  dp = Array.new(n+1){Array.new(q){nil}}

  if dp[i][m_i] != nil
    return dp[i][m_i]
  end

  if m == 0
    dp[i][m_i] = true

  elsif i >= n
    dp[i][m_i] = false

  elsif solve(i+1, m, m_i, n, a, q) || solve(i+1, m - a[i], m_i, n, a, q)
    dp[i][m_i] = true
  end
  return dp[i][m_i]
end

m.each_with_index{|value, m_i| 
  puts solve(0, value, m_i, n, a, q) ? "yes" : "no"
}
