module Main where
    import Debug.Trace
    import Data.List
    import qualified Data.Sequence as S
    import qualified Data.ByteString.Char8 as B
    import Data.Int
    import Data.Char
    import Data.Array
    import Data.Maybe
    import qualified Data.Map as M
    import Data.Ord
    import Data.Functor
    import Control.Applicative
    import Control.Monad
    
    solve ::[Int] -> [Int] -> [Bool]
    solve a = iter where
        iter [] = []
        iter (m:ms) = (sol a m):iter ms where
            sol [] m = False
            sol (a:as) m
                | m > a  = sol as m || sol as (m-a)
                | m < a  = False
                | m == a = True

    readIntLn:: IO Int
    readIntLn = (fst . fromJust . B.readInt) <$> B.getLine

    readIntList:: IO [Int]
    readIntList = map (fst . fromJust . B.readInt) . B.words <$> B.getLine

    main :: IO() 
    main = do
        n <- readIntLn
        a <- readIntList
        q <- readIntLn
        m <- readIntList
        mapM_ (putStrLn . (\t-> if t then "yes" else "no")) $ solve (sort a) m

