stdin.ReadLine() |> ignore stdin.ReadLine().Split() |> Array.map(int) |> Array.sort |> Array.pairwise |> Array.map(fun (a,b) -> b-a) |> function | x when x |> Array.forall (fun x -> x<>0) -> x |> Array.distinct |> Array.length |> function | 1 -> "YES" | _ -> "NO" | _ -> "NO" |> printfn "%s"