#include "bits/stdc++.h" using namespace std; int main() { int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int mi = 1e10; for (int i = 0; i < n - 1; i++) { mi = min(mi, a[i + 1] - a[i]); } cout << mi << endl; cout << a.back() - a.front() << endl; /*int j; cin >> j; cout << j << endl;*/ return 0; }