#include using namespace std; int main() { int n; cin >> n; vector v(n); for (int i = 0; i < n; i++) { cin >> v.at(i); } sort(v.begin(), v.end()); int min, max; max = v.at(v.size() - 1) - v.at(0); min = 1000000; for (int i = 1; i < n; i++) { int n = v.at(i) - v.at(i - 1); if (n < min) min = n; } cout << min << endl; cout << max << endl; }