#include #include #define REP(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int N; cin >> N; vector vc; REP(i, N) { int a; cin >> a; vc.push_back(a); } int max = vc.at(N - 1) - vc.at(0); int min = max; REP(i, N - 1) { int tmp = vc.at(i + 1) - vc.at(i); if (tmp < min) min = tmp; } cout << min << endl; cout << max << endl; return 0; }