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

    val choice = BooleanArray(n) { false }
    fun chk(m: Int) :Boolean {
        var sum = 0
        for (i in 0 until n) {
            sum += if (choice[i]) a[i] else 0
        }
        return sum == m
    }
    fun select (m: Int, d: Int): Boolean {
        arrayOf(true, false).forEach {
            choice[d] = it
            if (d+1 == n) {
                if(chk(m)) return true
            } else {
                if(select(m,d+1)) return true
            }
        }
        return false
    }

    val m = readLine()!!.split(' ')
    repeat(q) {
        val M = m[it].toInt()
        if (select(M, 0) ) println("yes")
        else println("no")
    }

}


