-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU import Data.List (sort) main = putStrLn . solve . sort . map read . tail . words =<< getContents solve xs = ans where ys = sort . map (\(a, b) -> a - b) $ tail xs `zip` xs hd = head ys ed = head $ reverse ys ans = if hd > 0 && hd == ed then "YES" else "NO"