#include <bits/stdc++.h>
using namespace std;
long long num[200005];
int main() {
  int s;
  while (~scanf("%d", &s)) {
    for (int i = 0; i < s; i++) {
      cin >> num[i];
    }
    sort(num, num + s);
    long long minn = 200000000000;
    for (int i = s - 1; i >= 1; i--) {
      long long ans = num[i] - num[i - 1];
      if (ans < 0) ans = -ans;
      if (ans < minn) minn = ans;
    }
    int t = 0;
    for (int i = s - 1; i >= 1; i--) {
      long long ans = num[i] - num[i - 1];
      if (ans == minn) t++;
    }
    cout << minn << " " << t;
  }
}
