#include <bits/stdc++.h>
using namespace std;
const int _max = 2e5 + 10;
int n;
int a[_max];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  sort(a, a + n);
  long long disMIN = LLONG_MAX;
  for (int i = 1; i < n; i++) disMIN = min(disMIN, abs(1LL * a[i] - a[i - 1]));
  int cnt = 0;
  for (int i = 1; i < n; i++)
    if (disMIN == abs(1LL * a[i] - a[i - 1])) cnt++;
  printf("%I64d %d", disMIN, cnt);
  return 0;
}
