import Control.Applicative f xs n a = if (sum xs) == (n * a) then "YES" else "NO" main = do [n,a] <- (map read . words) <$> getLine xs <- (map read . words) <$> getLine putStrLn $ f xs n a