module Main where

import Data.Set (Set)
import qualified Data.Set as Set

main :: IO ()
main =
  (read :: String -> Int) <$> getLine >>= \n ->
  (map (read :: String -> Int) . words) <$> getLine >>= \arr ->
  if Set.size (Set.fromList arr) /= n
     then putStrLn "NO"
     else putStrLn "YES"
