process.stdin.resume()
process.stdin.setEncoding("utf8")

const reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout,
})

const lines = []

reader.on("line", (line) => {
  lines.push(line)
})

reader.on("close", () => {
  const n = lines[0] - 0
  const A = lines[1].split(" ").map(Number)
  const q = lines[2] - 0
  const ms = lines[3].split(" ").map(Number);

  const solve = (i, m) => {
    if (m === 0) {
      return true
    }

    if (i >= n) {
      return false
    }

    return solve(i + 1, m) || solve(i + 1, m - A[i])
  }

  for (let i = 0; i < q; i++) {
    console.log(solve(0, ms[i]) ? "yes" : "no")
  }
})

