#include <bits/stdc++.h>
using namespace std;
int arr[200009];
vector<int> vec;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> arr[i];
  sort(arr + 1, arr + n + 1);
  for (long long i = 1; i <= n - 1; i++)
    vec.push_back(abs(arr[i] - arr[i + 1]));
  sort(vec.begin(), vec.end());
  cout << vec[0] << " ";
  int cnt = 1;
  for (long long i = 1; i <= vec.size() - 1; i++) {
    if (vec[i] == vec[0])
      cnt++;
    else
      break;
  }
  cout << cnt << endl;
}
