
let rec check arr i n =
  if i >= n then print_endline "YES"
  else 
    let t = Array.map ((=) arr.(i)) arr
    |> Array.map (fun b -> if b = true then 1 else 0)
    |> Array.fold_left (+) 0
    in
    if t > 1 then print_endline "NO"
    else check arr (i+1) n

let () =
  let n = read_int ()
  in
  let arr = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a))
  in
  check arr 0 n
  
  