#include #include #include #include #include #include #include using namespace std; using uint = unsigned int; using ll = long long; #define CIN( LL , A ) LL A; cin >> A #define GETLINE( A ) string A; getline( cin , A ) #define FOR_ITR( ARRAY , ITR , END ) for( auto ITR = ARRAY .begin() , END = ARRAY .end() ; ITR != END ; ITR ++ ) int main() { CIN( ll , N ); ll a_prev; ll a_next; ll min = 200001; ll max; for( ll i = 0 ; i < N ; i++ ){ cin >> a_next; if( i == 0 ){ max = - a_next; } else { ll d = a_next - a_prev; if( d < min ){ min = d; } } a_prev = a_next; } max += a_next; cout << min << endl; cout << max << endl; return 0; }