open Batteries
let n = read_int ()
let a = read_line () |> String.split_on_char ' ' |> List.sort compare

let _ =
  let rec loop lst =
    match lst with
    | [] -> "YES"
    | first :: rest -> if first = List.hd rest then "NO" else loop rest
  in loop a |> print_endline