#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n + 1];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int min_dist = INT_MAX;
  for (int i = 0; i < n - 1; i++) {
    int temp = arr[i + 1] - arr[i];
    temp = abs(temp);
    min_dist = min(min_dist, temp);
  }
  int cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    int temp = arr[i + 1] - arr[i];
    temp = abs(temp);
    if (temp == min_dist) {
      cnt++;
    }
  }
  cout << min_dist << " " << cnt << endl;
}
