#include <bits/stdc++.h>
using namespace std;
int a[200000];
int main() {
  long long int i, j, k, l, m, n, min;
  while (scanf("%lld", &n) != EOF) {
    k = 0;
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n);
    min = a[1] - a[0];
    if (min < 0) min = -min;
    for (i = 2; i < n; i++) {
      l = a[i] - a[i - 1];
      if (l < 0) l = -l;
      if (l < min) min = l;
    }
    for (i = 1; i < n; i++) {
      l = a[i] - a[i - 1];
      if (l < 0) l = -l;
      if (min == l) k++;
    }
    printf("%lld %lld\n", min, k);
  }
  return 0;
}
