let () =
  Scanf.scanf "%d\n" @@ fun n ->
  let lst = Array.to_list (Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun d -> d) in
  let ans = (List.length lst) = List.length (List.sort_uniq compare lst) in
  Printf.printf "%s\n" (if ans then "YES" else "NO")