#include using namespace std; int main(void) { int n, a; cin >> n; int prev; cin >> prev; int ans_min = 200200, ans_max = prev; for (int i = 1; i < n; ++i) { cin >> a; if (i == n - 1) ans_max = a - ans_max; int diff = a - prev; ans_min = min(ans_min, diff); prev = a; } cout << ans_min << "\n" << ans_max << "\n"; return 0; }