

n = gets.to_i
num = gets.split.map(&:to_i)
m = gets.to_i
qu = gets.split.map(&:to_i)
ans = Array.new(m){false}

def solve i, m
	return true if m == 0
	return false if i >= m
	return solve(i+1, m) || solve(i+1, m-qu[i])
end

n.times do |i|
	m.times do |j|
	 if solve(0, qu[j]) 
	 	puts "yes"
	 else
	 	puts "no"
	 end
	end
end