#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, x;
  cin >> n;
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  long long minm = 1e18 + 17, cnt = 0;
  for (long long i = 1; i < v.size(); i++) {
    long long val = v[i] - v[i - 1];
    if (val < minm) minm = val;
  }
  for (long long i = 1; i < v.size(); i++)
    if (v[i] - v[i - 1] == minm) cnt++;
  cout << minm << " " << cnt << "\n";
  return 0;
}
