n = gets.to_i
A = gets.split.map &:to_i
m = gets.to_i
B = gets.split.map &:to_i
ans = Array.new(m,false)

[true, false].repeated_permutation(n) do |c|
  sum = c.zip(A).select(&:first).map(&:last).sum
  B.each_with_index do |b,i|
    ans[i] = true if b == sum
  end
end

ans.each do |flag|
  puts flag ? "yes": "no"
end
