let () =
    let n = read_int () in
    let arr = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in
    Array.sort compare arr;
    let rec loop i prev =
        if i = n then "YES" else
            if arr.(i) = prev then "NO" else loop (i + 1) arr.(i)
    in
    loop 1 arr.(0) |>  print_endline