#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int i, j, k; int n; vectora; cin >> n; for (i = 0; i < n; i++) { int num; cin >> num; a.push_back(num); } sort(a.begin(), a.end()); long maxnum = (a[a.size() - 1] - a[0]); long minnum = 99999999999; for (i = 1; i < n; i++) { minnum = min((long)(a[i] - a[i - 1]), minnum); } cout << minnum << endl; cout << maxnum << endl; getchar(); getchar(); return 0; }