import scala.io.StdIn.{readInt, readLine};
object Main {
    def main(args: Array[String]): Unit = {
        readInt;
        val arr = readLine.split(" ").map(_.toInt);
        readInt;
        val es = new ExhaustiveSearch(arr);
        readLine.split(" ").map(_.toInt).foreach { target => if (es.solve(target)) println("yes") else println("no")}
    }
}
class ExhaustiveSearch(arr: Array[Int]) {
    val size = arr.length;
    val sum = arr.foldLeft(0){ (s, v) => s + v};
    val dpArr = Array.ofDim[Int](size, sum + 1);
    def solve(target: Int): Boolean = {
        def _solve(idx: Int, t: Int): Boolean = {
            if (t < 0 || t > sum || idx >= size) {
                false;
            } else {
                if (dpArr(idx)(t) == 1) {
                    true;
                } else if (dpArr(idx)(t) == -1) {
                    false;
                } else {
                    if (t == 0 || _solve(idx + 1, t) || _solve(idx + 1, t - arr(idx))) {
                        dpArr(idx)(t) = 1;
                        true;
                    } else {
                        dpArr(idx)(t) = -1;
                        false;
                    }
                }
            }
        }
        _solve(0, target);
    }
}
