#include // #include using namespace std; // using bigint = boost::multiprecision::cpp_int; template using min_priority_queue = priority_queue,greater>; random_device seed_gen; mt19937 engine(seed_gen()); int64_t get_time_ns(){ struct::timespec t; clock_gettime(CLOCK_MONOTONIC, &t); return t.tv_sec * int64_t(1'000'000'000) + t.tv_nsec; } int main() { int n; cin >> n; vector A(n); for(int &a : A) cin >> a; int x = 1'000'000; for(int i = 0; i < n - 1; i++) { if(x > A[i+1] - A[i]) x = A[i+1] - A[i]; } int y = A[n-1] - A[0]; cout << x << endl << y << endl; return 0; }