#include #include #include using namespace std; int main(void){ int n; cin >> n; int a[n]; for(int i = 0; i < n; i++) cin >> a[i]; int Max = a[n - 1] - a[0]; int Min = Max; for(int i = 0; i < n - 1; i++){ int temp = a[i + 1] - a[i]; Min = min(Min, temp); } cout << Min << endl; cout << Max << endl; return 0; }