import Data.Array.Unboxed
main = getLine >>= main' . fmap read . words
    where
        main' [n, d] = getLine >>= main'' n d . fmap read . words
        main'' n d ds = getLine >> getLine >>= mapM_ printRes . solve n d ds . fmap read . words
        printRes b = putStrLn str
            where
                str
                    | b = "YES"
                    | otherwise = "NO"

solve :: Int -> Int -> [Int] -> [Int] -> [Bool]
solve n d ds = fmap (arr !)
    where
        arr :: UArray Int Bool
        arr = array (1, n) $ build d ds

build :: Int -> [Int] -> [(Int, Bool)]
build d ds = fst $ calc d 1 (tail ds) (0 : ds)
    where
        calc acc n (x : xs) (y : ys) = ((n, next <= acc') : zs, next)
            where
                (zs, b) = calc acc' (n + 1) xs ys
                acc' = min acc . abs $ acc - y
                next
                    | b > x `div` 2 = b + x
                    | otherwise = b
        calc acc n _ (y : _) = ([(n, 1 <= min acc (abs $ acc - y))], 1)
