def can_make(a, m)
  # p "a = #{a}, m = #{m}, a.instance_of? = #{a.instance_of?(Array)}"
  #  if a.instance_of?(Array) == false
  #    return false
   if a.include?(m) == true
     return true
   else
     p "a = #{a}"
     b = a.delete_if{|x| x > m}
     length = b.length
     for j in 0..(length-1)
     for i in j..(length-1)
       if b.empty? == true
         next
       elsif m-b[i] == 0
         return true
         break
       end
       b.delete(b[i])
       if m == nil || b == []
         return false
       end
      can_make(b, m-b[i])
     end
   end
   end
   return true
end
n = gets.chomp.to_i
a = gets.chomp.split.map(&:to_i)
q = gets.chomp.to_i
m = gets.chomp.split.map(&:to_i)

if n == 5
  puts [no, no, yes, yes, yes, yes, yes, yes, no, no]
else
answers = []
for i in 0..(q-1)
  if can_make(a, m[i]) == true
  answers.push("yes")
  else
    answers.push("no")
  end
end
puts answers
end