#include <bits/stdc++.h>
using namespace std;
class answer {
 private:
  int distant, cityCnt;

 public:
  void __construct(int distant) {
    this->distant = distant;
    this->cityCnt = 1;
  }
  void cmp(int distant) {
    if (distant < (this->distant))
      __construct(distant);
    else if (distant == (this->distant))
      this->cityCnt++;
  }
  void show() { cout << distant << " " << cityCnt << endl; }
};
int main() {
  answer *ans = new answer;
  ans->__construct(2e9 + 1);
  const int MAX_DATA = 2e5 + 1;
  int city[MAX_DATA] = {0}, dataCnt, i;
  cin >> dataCnt;
  for (i = 0; i < dataCnt; i++) {
    cin >> city[i];
  }
  sort(city, city + dataCnt);
  for (i = 1; i < dataCnt; i++) {
    ans->cmp(city[i] - city[i - 1]);
  }
  ans->show();
  return 0;
}
