import           Data.Set (empty, member, insert)

nub' :: (Ord a) => [a] -> [a]
nub' l = nub'' l empty
  where
    nub'' [] _ = []
    nub'' (x:xs) s
      | x `member` s = nub'' xs s
      | otherwise = x:nub'' xs (x `insert` s)

main = do
  getLine
  a <- map (read :: String -> Int) . words <$> getLine
  putStrLn
    $ if length a == (length . nub') a
      then "YES"
      else "NO"