#include <bits/stdc++.h>
using namespace std;
long long int a[200010];
int main() {
  long long i, n, j, mn = LONG_LONG_MAX;
  map<long long, long long> mp;
  cin >> n;
  for (i = 0; i < n; i++) scanf("%lld", &a[i]);
  sort(a, a + n);
  for (i = 0; i < n - 1; i++) {
    mn = min(mn, abs(a[i] - a[i + 1]));
    mp[abs(a[i] - a[i + 1])]++;
  }
  cout << mn << " " << mp[mn] << endl;
  return 0;
}
