#include #include #include using namespace std; int main() { int n; cin >> n; int x[n]; for(int i = 0; i < n; i++) cin >> x[i]; sort(x,x+n); float min = INFINITY,cou = 0; for(int i = 0; i < n ; i++){ if(x[i+1] - x[i] < min && x[i+1] != x[i]) min = x[i+1] - x[i]; if(x[i+1] == x[i]) cou++; } cout << cou << endl; if(n == 0 || n == cou + 1) cout << '0' << endl; else cout << min << endl; return 0; }