#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using dl = double;
const int N = 2e5 + 10;
ll aarray[200000 + 10];
ll magic[101][101];
vector<ll> primes;
bool prime[1000001];
int main() {
  ios_base::sync_with_stdio(false);
  string str;
  ll i, j, n, m, k, t;
  cin >> n;
  vector<ll> v;
  for (i = 1; i <= n; i++) {
    cin >> aarray[i];
  }
  map<ll, ll> mp;
  sort(aarray + 1, aarray + n + 1);
  ll pre = INT_MAX;
  for (i = 2; i <= n; i++) {
    k = abs(aarray[i] - aarray[i - 1]);
    mp[k]++;
    if (k < pre) pre = k;
  }
  cout << pre << " " << mp[pre] << endl;
  return 0;
}
