import Data.List

solve x = if x == 0
    then "NO"
    else "YES"


main = do
    n <- map read . words<$>getLine ::IO [Int]
    a <- map read . words<$>getLine ::IO [Int]
    let aa = sort a
    let b = aa ++ [0]
    let bb = 0:aa
    let c = zipWith (-) b bb
    --let d = find (==0) c
    let e = [e | e <- c, e > -1]
    let f = sort e
    let g = head f
    let h = solve g 
    putStrLn $ h