#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((ll)ma,a[i] - a[i - 1]); if(i != 0)mi = min((ll)mi,a[i] - a[i - 1]); } cout << mi << endl; cout << a[n - 1] - a[0] << endl; }