#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; void solve() { int N, x, a = 1e9, b; cin >> N; vector v(N); rep(i, 0, N) { cin >> v[i]; } rep(i, 0, N - 1) { x = abs(v[i + 1] - v[i]); a = min(a, x); } cout << a << endl; cout << abs(v[N - 1] - v[0]) << endl; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); getchar(); }