n = gets.chomp.to_i
aAry = gets.chomp.split.map(&:to_i)
q = gets.chomp.to_i
mAry = gets.chomp.split.map(&:to_i)

# p n, aAry, q, mAry

def recSolve(ary, i, m)
    if m == 0 then
        return true
    elsif i >= ary.size then
        return false
    else
        res = recSolve(ary, i + 1, m) || recSolve(ary, i + 1, m - ary[i])
        return res
    end
end

mAry.each do |m|
    # puts "m = " + m.to_s
    if recSolve(aAry, 0, m) then
        puts "yes"
    else
        puts "no"
    end
end

