fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val sequence = readLine()!!.split(' ').map { it.toInt() }
    readLine()!!.toInt()
    val questions = readLine()!!.split(' ').map { it.toInt() }

    fun f(i: Int, m: Int): Boolean {
        if (m == 0) {
            return true
        }
        if (i >= n) {
            return false
        }
        val r1 = f(i + 1, m)
        val r2 = f(i + 1, m - sequence[i])
        return r1 || r2
    }

    questions.forEach {
        println(if (f(0, it)) "yes" else "no")
    }

}
