#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m = 1e15, a[200010], cnt = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 0; i < n - 1; i++) {
    if (abs(a[i + 1] - a[i]) < m) m = abs(a[i + 1] - a[i]);
  }
  for (int i = 0; i < n - 1; i++) {
    if (abs(a[i + 1] - a[i]) == m) cnt++;
  }
  cout << m << " " << cnt << endl;
}
