import Control.Applicative
import Control.Monad
import Data.List

check :: [[Int]] -> Int -> IO ()
check [] q = putStrLn $ "no"
check (x:xs) q = if (sum x) == q then putStrLn $ "yes" else check xs q

solver :: [Int] -> Int -> IO ()
solver ns q = check (filterM (\x -> [True, False]) ns) q

main :: IO ()
main = do
    _ <- getLine
    ns <-  (map (\x -> read x :: Int). words) <$> getLine
    _ <- getLine
    qs <-  (map (\x -> read x :: Int). words) <$> getLine
    mapM_ (solver ns) qs