#include <bits/stdc++.h>
using namespace std;
enum { North, East, South, West };
int mi[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int mj[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int MN = 2 * 1e+5 + 35;
int n;
long long data[MN];
void solve() {
  sort(data, data + n);
  long long ans = 0x3F3F3F3F3F3F3F3FLL;
  int cnt = 0;
  for (int i = 1; i < n; i++) {
    if (abs(data[i] - data[i - 1]) < ans) {
      ans = abs(data[i] - data[i - 1]);
      cnt = 1;
    } else if (abs(data[i] - data[i - 1]) == ans)
      cnt++;
  }
  printf("%lld %d\n", ans, cnt);
}
void read() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &data[i]);
}
void init() {
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
  cout << "[FREOPEN]" << endl;
  return;
}
int main() {
  read();
  solve();
  return 0;
}
