let R () = stdin.ReadLine() let N = R() let a = R().Split() |> Array.map int let Min = let pair = a |> Array.pairwise pair |> Array.map(fun (l,r) -> r - l) |> Array.min let Max = (a |> Array.max) - (a |> Array.min) Min |> printfn "%i" Max |> printfn "%i"