#include <bits/stdc++.h>
using namespace std;
int v[200010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> v[i];
  sort(v, v + n);
  int mn = INT_MAX;
  for (int i = 1; i < n; ++i) mn = min(abs(v[i] - v[i - 1]), mn);
  int ans = 0;
  for (int i = 1; i < n; ++i)
    if (abs(v[i] - v[i - 1]) == mn) ans++;
  cout << mn << " " << ans << "\n";
  return 0;
}
