import Data.List (foldl') import Data.Bits (xor) main = do [n, k] <- readL :: IO [Int] a <- readL :: IO [Int] putStrLn $ if solve k a then "YES" else "NO" solve :: Int -> [Int] -> Bool solve k = (/=0) . foldl' xor 0 . map (flip mod (k + 1)) readL :: IO [Int] readL = map read . words <$> getLine