import Data.Bits (Bits, xor) canWin :: (Bits a, Integral a) => a -> [a] -> Bool canWin k as = (/= 0) $ foldr1 xor $ fmap (`mod` (k + 1)) as main :: IO () main = do [_, k] <- fmap read . words <$> getLine :: IO [Int] as <- fmap read . words <$> getLine :: IO [Int] putStrLn $ if canWin k as then "YES" else "NO"