def solve(i,m,n,a)
    if m == 0
        return true
    end
    if i >= n
        return false
    end
    #m-a[i]→i番目の要素を使う
    res = solve(i+1,m,n,a) || solve(i+1,m-a[i],n,a)
        return res
end

n = gets.to_i
a = gets.split(" ").map(&:to_i)
q = gets.to_i
m = gets.split(" ").map(&:to_i)
i = 0
k = 0

    while k < q
        if solve(0,m[k],n,a)
            puts "yes"
        else
            puts "no"
        end
    k +=1
    end
