import scala.io.StdIn._
import scala.collection.mutable

object Main extends App {
  
  def solve(m: Int, a: Array[Int], i: Int = 0, memo: mutable.Map[(Int, Int), Boolean]= mutable.Map()): Boolean = m match {
    case 0 => true
    case _ if i >= a.size => false
    case _ if (memo.get(i, m) != None) => memo((i, m))
    case _ => 
      val r = solve(m, a, i + 1, memo) || solve(m - a(i), a, i + 1, memo)
      memo += ((i, m) -> r)
      r
  }

  val N = readLine.toInt
  val A = readLine.split(" ").map(_.toInt)
  val Q = readLine.toInt
  val M = readLine.split(" ").map(_.toInt)
  M.foreach(m => if (solve(m, A)) println("yes") else println("no"))
}
