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, 0)) println("yes") else println("no")
        }
    }
    def search(haystack: List[Int], len: Int, target: Int, count: Int): Boolean = {
        if (len == count) false
        else if (combinationExists(haystack, 0, target, count)) true
        else search(haystack, len, target, count + 1)
    }
    // haystack から count 個の要素を足し合わせて target になる組み合わせがあるかどうかを調べる。
    def combinationExists(haystack: List[Int], sum: Int, target: Int, count: Int): Boolean = {
        if (count == 0) {
            if (sum == target) true else false
        } else {
            haystack match {
                case Nil => false
                case x :: xs => {
                    if (sum > target) return false
                    if (combinationExists(xs, sum + x, target, count - 1)) true
                    else combinationExists(xs, sum, target, count)
                }
            }
        }
    }
}
