
import Control.Applicative
import Control.Monad
import Data.List
import Debug.Trace (traceShow, traceShowM)
import qualified Data.ByteString.Char8 as B

import Control.Monad.ST
import Data.Array.ST

readi b | Just (n, _) <- B.readInt b = n

main :: IO ()
main = do
    n <- readLn
    as <- fmap readi . B.words <$> B.getLine
    q <- readLn
    ms <- fmap readi . B.words <$> B.getLine
    let bs = solve n as q ms
    forM_ bs $ \b -> do
        if b then putStrLn "yes" else putStrLn "no"

solve :: Int -> [Int] -> Int -> [Int] -> [Bool]
solve n as q ms = runST $ do
    dp <- newArray ((0, 0), (n, maxm)) False :: ST s (STUArray s (Int, Int) Bool)
    writeArray dp (0, 0) True
    bs <- newListArray (1, n) as :: ST s (STUArray s Int Int)
    forM_ [1 .. n] $ \i -> do
        forM_ [0 .. maxm] $ \j -> do
            bi <- readArray bs i
            v1 <- readArray dp (i - 1, j)
            if j < bi
                then writeArray dp (i, j) v1
                else do
                    v2 <- readArray dp (i - 1, j - bi)
                    writeArray dp (i, j) (v1 || v2)
    sequence [readArray dp (n, m) | m <- ms]
  where
    maxm = maximum ms

