#include using namespace std; int main() { int n; cin >> n; vector a(n); int m = 1000000; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n - 1; i++) { int d = a[i+1] - a[i]; if (d < 0) d = -d; if (m > d) m = d; } int M = a[n-1] - a[0]; if (M < 0) M = -M; cout << m << endl; cout << M << endl; return 0; }