#include using namespace std; int main() { int N; cin >> N; int X = 0, Y = 1e9; int a; cin >> a; int c = a, b; while (--N) { cin >> b; Y = min(Y, b - a); a = b; } cout << Y << "\n" << b - c << "\n"; }