can = [0]
l = gets.to_i
a = gets.split.map(&:to_i)
n = gets.to_i
m = gets.split.map(&:to_i)
l.times{|i|
  if i == 0
    can << a[i]
  else
    can = Marshal.load(Marshal.dump(can + can.map {|ele| ele + a[i]}))
  end
  can.uniq!
}
n.times{|i|
  if can.include?m[i]
    puts 'yes'
  else
    puts 'no'
  end
}