#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int main(){ ll n; cin >> n; vector a(n); ll ma = 0; ll mi = pow(10,18); for(int i = 0;i < n;i++){ cin >> a[i]; ma = max(ma,a[i] - a[i - 1]); mi = min(mi,a[i] - a[i - 1]); } cout << mi << endl; cout << ma << endl; }