#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e15 + 7;
const int maxn = 200010;
ll a[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  sort(a, a + n);
  ll ans = 0;
  ll dis = INF;
  map<ll, ll> m;
  for (int i = 0; i < n - 1; i++) {
    ll temp = abs(a[i + 1] - a[i]);
    m[temp]++;
    if (temp <= dis) {
      ans = m[temp];
      dis = temp;
    }
  }
  cout << dis << " " << ans << '\n';
  return 0;
}
