#include <bits/stdc++.h>
using namespace std;
long long n, a[200001], i, ans = 2000000000, ans1;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (i = 0; i < n - 1; i++) ans = min(ans, a[i + 1] - a[i]);
  for (i = 0; i < n - 1; i++)
    if (a[i + 1] - a[i] == ans) ans1++;
  cout << ans << ' ' << ans1;
  return 0;
}
