gets
a = gets.split(' ').map(&:to_i)
gets
b = gets.split(' ').map(&:to_i)

def solve(a,m,i)
  if m == 0
    return true
  elsif i >= a.size
    return false
  else
    res = solve(a,m,i+1) || solve(a,m-a[i],i+1)
  end
  return res
end
b.each do |m|
  if solve(a,m,0)
    puts "yes"
  else
    puts "no"
  end
end