gets
a = gets.split.map(&:to_i)
h = [0]
a.each{|i|
    h += h.clone.map{|j| j + i}
    h.uniq!
}

gets
m = gets.split.map(&:to_i)
m.each{|i|
    if h.include?(i) then
        puts "yes"
    else
        puts "no"
    end
}
