import Data.Array
main = getLine >>= main' . fmap read . words
    where
        main' [n, d] = getLine >>= main'' n d . fmap read . words
        main'' n d ds = getLine >> getLine >>= mapM_ putStrLn . solve n d ds . fmap read . words

solve :: Int -> Int -> [Int] -> [Int] -> [String]
solve n d ds = fmap (arr !)
    where
        arr = listArray (1, n) . fst . foldr ff ([], 1) $ build d ds

        ff (x, y) (acc, b)
            | next <= y = ("YES" : acc, next)
            | otherwise = ("NO" : acc, next)
            where
                next
                    | b > x `div` 2 = b + x
                    | otherwise = b

build :: Int -> [Int] -> [(Int, Int)]
build d ds = calc d (tail ds) (0 : ds)
    where
        calc acc (x : xs) (y : ys) = (x, next) : calc next xs ys
            where
                next = min acc . abs $ acc - y
        calc acc _ (y : _) = [(0, min acc . abs $ acc - y)]
