#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, cm = 10000000000, c = 0;
  cin >> n;
  vector<int> vec;
  for (long long int i = 0; i < n; i++) {
    long long int c;
    cin >> c;
    vec.push_back(c);
  }
  sort(vec.begin(), vec.end());
  for (long long int i = 0; i < (vec.size() - 1); i++) {
    int x;
    x = vec[i] - vec[i + 1];
    if (x < 0) x = x * (-1);
    if (x < cm) {
      cm = x;
    }
  }
  for (long long int i = 0; i < (vec.size() - 1); i++) {
    int x;
    x = vec[i] - vec[i + 1];
    if (x < 0) x = x * (-1);
    if (x == cm) c++;
  }
  cout << cm << " " << c;
}
