n = gets.to_i
aArr = gets.split.map(&:to_i).sort.reverse
q = gets.to_i
mArr = gets.split.map(&:to_i)

for m in mArr do
  flag = false
  ans = [m]
  count = 0
  for a in aArr do
    count += 1
    ans += ans.map{|x| x-a}
    ans.select{|x| 0<=x && x<=a*(n-count)}
    if ans.include?(0)
      flag = true
      break
    end
  end
  printf("%s\n",flag ? "yes" : "no")
end
