#include <bits/stdc++.h>
using namespace std;
long long pow(int a, int b, long long MOD) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y);
      if (x > MOD) x %= MOD;
    }
    y = (y * y);
    if (y > MOD) y %= MOD;
    b /= 2;
  }
  return x;
}
long long InverseEuler(int n, long long MOD) { return pow(n, MOD - 2, MOD); }
int hcf(int n1, int n2) {
  if (n2 != 0)
    return hcf(n2, n1 % n2);
  else
    return n1;
}
int p[100090] = {};
void prime() {
  for (int i = 2; i * i <= 100009; i++)
    if (p[i] == 0)
      for (int j = i + i; j <= 100009; j += i) p[j] = 1;
  p[0] = 1;
  p[1] = 1;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  map<int, int> mm;
  int an = INT_MAX;
  for (int i = 1; i < n; i++) {
    if (an >= abs(a[i] - a[i - 1]))
      an = abs(a[i] - a[i - 1]), mm[abs(a[i] - a[i - 1])]++;
  }
  cout << an << " " << mm[an] << endl;
}
