let doIt () = let _ = stdin.ReadLine () let xlist = stdin.ReadLine () |> fun s -> s.Split () |> Seq.map int |> Seq.sort let dlist = xlist |> Seq.pairwise |> Seq.map (fun (x1, x2) -> x2 - x1) |> Seq.cache let d1 = Seq.head dlist (d1 > 0 && Seq.forall (fun d -> d = d1) dlist) |> (function | true -> "YES" | false -> "NO") |> printfn "%s" doIt ()