def solve?(n, sequence, index)
	return true if n == 0
	return false if index >= sequence.size
	solve?(n, sequence, index + 1) || # sequence[index]を選択ないパターン
		solve?(n - sequence[index], sequence, index + 1) # sequence[index]を選択するパターン
end

n = STDIN.gets.to_i
sequence = STDIN.gets.split[0...n].map(&:to_i)
m = STDIN.gets.to_i
questions = STDIN.gets.split[0...m].map(&:to_i)

sequence.sort!
questions.each do |q|
	puts solve?(q, sequence, 0) ? "yes" : "no"
end