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, target, len)) println("yes") else println("no")
        }
    }
    def search(haystack: List[Int], target: Int, len: Int): Boolean = {
        if (target == 0) return true
        if (len == 0) return false
        else {
            val x = haystack.head
            val xs = haystack.tail
            search(xs, target - x, len - 1) || search(xs, target, len - 1)
        }
    }
}
