#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  int a[200010], b[200010];
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n);
    int l = 0;
    for (i = 1; i < n; i++) b[l++] = a[i] - a[i - 1];
    sort(b, b + l);
    int s = 1;
    for (i = 1; i < n; i++)
      if (b[i] == b[i - 1])
        s++;
      else
        break;
    printf("%d %d\n", b[0], s);
  }
  return 0;
}
