#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, t;
  long long a[211111], m;
  while (scanf("%d", &n) == 1) {
    m = 0x7fffffff, t = 0;
    for (i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    for (i = 1; i < n; i++)
      if ((a[i] - a[i - 1]) < m) m = (a[i] - a[i - 1]);
    for (i = 1; i < n; i++)
      if ((a[i] - a[i - 1]) == m) t++;
    cout << m << " " << t << endl;
  }
  return 0;
}
