#include "bits/stdc++.h" using namespace std; int main() { int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int mi = (int)1e9; for (int i = 0; i < n - 1; i++) { mi = min(mi, a[i + 1] - a[i]); } cout << mi << endl; cout << a.back() - a.front() << endl; }