import scala.io.StdIn.{readInt, readLine}
object Main {
    def main(args: Array[String]): Unit = {
        val len = readInt
        val list = readLine.split(" ").map(_.toInt).toList
        readInt
        readLine.split(" ").map(_.toInt).foreach { target =>
            if (search(list, len, target)) println("yes") else println("no")
        }
    }
    def search(haystack: List[Int], len: Int, target: Int): Boolean = {
        if (len == 0) {
            false
        } else if (combinationExists(haystack, Nil, target, len)) {
            true
        } else {
            search(haystack, len - 1, target)
        }
    }
    // haystack から count 個の要素を足し合わせて target になる組み合わせがあるかどうかを調べる。
    def combinationExists(haystack: List[Int], elems: List[Int], target: Int, count: Int): Boolean = {
        if (count == 0) {
            if (elems.sum == target) true else false
        } else {
            haystack match {
                case Nil => false
                case x :: xs if (elems.sum > target) => false
                case x :: xs => {
                    if (combinationExists(xs, x :: elems, target, count - 1)) {
                        true
                    } else {
                        combinationExists(xs, elems, target, count)
                    }
                }
            }
        }
    }
}
