fun main(args: Array) { val n = readLine()!!.toInt() val a = readLine()!!.split(" ").map { it.toInt() } val diff = (1..a.lastIndex).map { a[it] - a[it-1] }.sorted() println(diff.first()) println(a.last() - a.first()) }