import Control.Applicative import Data.List main :: IO() main = do getLine x <- sort . map (read::String->Int) . words <$> getLine putStrLn $ check $ func x where func (x:y:xs) = (y-x):(func(y:xs)) func (x:[]) = [] check (x:y:xs) | x == 0 = "NO" | x == y = check (y:xs) | otherwise = "NO" check (x:[]) = "YES"