import qualified Data.IntSet as S
  
main :: IO ()
main = do
  getLine
  as <- map read . words <$> getLine
  putStrLn $ if (solve as) then "YES" else "NO"

solve :: [Int] -> Bool
solve as = go S.empty as
  where
    go _ [] = True
    go s (a:as)
      | a `S.member` s = False
      | otherwise      = go (S.insert a s) as