var n = parseInt(readline());
var coordinates = readline().split(' ').map(Number).sort((a, b) => { return a - b; });

var min = Infinity;
var num_min = 1;

for(var i = 1; i < coordinates.length; i++) {

    var delta = Math.abs(coordinates[i] - coordinates[i - 1]);

    if(delta < min) {
        min = delta;
        num_min = 1;
    } else if(delta === min) {
        num_min++;
    }
}

print(min + " " + num_min);

/*
    The idea to solve this problem is by thinking the city in linear line (sorted), thus each city will paired
    with city which has minimum distance with it.

    After that just find the minimum distance globally & count the occurence.
*/

var n = parseInt(readline());
var coordinates = readline().split(' ').map(Number).sort((a, b) => { return a - b; });

var min = Infinity;
var num_min = 1;

for(var i = 1; i < coordinates.length; i++) {

    // get distance with previous city
    var delta = Math.abs(coordinates[i] - coordinates[i - 1]);

    // check minimum distance globally + count occurences
    if(delta === min) {
        num_min++;
    } else if(delta < min) {
        min = delta;
        num_min = 1;
    }
}

print(min + " " + num_min);

"use strict"
if (typeof print === 'undefined') var print = console.log;
if (typeof readline === 'undefined') {
    let lines = require('fs').readFileSync('/dev/stdin').toString().split('\n'), id = 0;
    var readline = () => lines[id++];
}

var x = +readline();
var a = readline().split(' ').map(x => +x).sort((a, b) => a - b);

var ans = Infinity;
var cnt = 0;

for (var i = 0; ++i < x; ) {
    var diff = a[i] - a[i - 1];
    //console.warn(diff);
    if (diff > ans) continue;
    if (diff < ans) {
        ans = diff;
        cnt = 0;
    }
    if (diff == ans) ++cnt;
}

print(ans + ' ' + cnt);

  var n = parseInt(readline());
  var d = readline().split(' ').map(function(x) {
      return parseInt(x);
  }).sort(function(a, b) {
      return a - b;
  });
  var dis = [];
  var mind = Infinity;
  for(var i = 1; i < n; i += 1) {
    if(dis[d[i] - d[i - 1]] === undefined) {
      dis[d[i] - d[i - 1]] = 1;
    } else {
      dis[d[i] - d[i - 1]] += 1;
    }
    mind = Math.min(mind, d[i] - d[i - 1]);
  }
  print([mind, dis[mind]].join(' '));

var n = parseInt(readline());
var input = readline().split(" ");

input.sort(function(a, b) { return a - b; });

var counter = 1;
var min = input[1] - input[0];

for (var i = 1; i < input.length - 1; i++) {

	if (input[i + 1] - input[i] === min)
		counter++;

	if (input[i + 1] - input[i] < min) {
		min = input[i + 1] - input[i];
		counter = 1;
	}

}

print(min + " " + counter);

var n = parseInt(readline());
var coordinates = readline().split(' ').map(Number).sort((a, b) => { return a - b; });

var min = Infinity;
var num_min = 0;

for(var i = 1; i < coordinates.length; i++) {

    tmp_min = Math.min(min, Math.abs(coordinates[i] - coordinates[i - 1]));

    min === tmp_min ? num_min++ : num_min = 1;
    min = tmp_min;
}

print(min + " " + num_min);

var n = parseInt(readline());
var input = readline().split(" ");

input.sort();

var counter = 1;
var min = input[1] - input[0];

for (var i = 1; i < input.length - 1; i++) {

	if (input[i + 1] - input[i] === min)
		counter++;

	if (input[i + 1] - input[i] < min) {
		min = input[i + 1] - input[i];
		counter = 1;
	}

}

print(min + " " + counter);

var n = parseInt(readline());
var input = readline().split(" ");

input.sort(function(a, b) { return a - b; });
print(input);

var counter = 1;
var min = input[1] - input[0];

for (var i = 1; i < input.length - 1; i++) {

	if (input[i + 1] - input[i] === min)
		counter++;

	if (input[i + 1] - input[i] < min) {
		min = input[i + 1] - input[i];
		counter = 1;
	}

}

print(min + " " + counter);

var n = parseInt(readline());
var input = readline().split(" ");

input.sort();

var counter = 1;
var min = input[1] - input[0];

for (var i = 1; i < input.length - 1; i++) {
	if (input[i + 1] - input[i] < min) {
		min = input[i + 1] - input[i];
		counter = 1;
	}

	if (input[i + 1] - input[i] === min)
		counter++;
}

print(min + " " + counter);

if (typeof print === 'undefined') print = console.log;
if (typeof readline === 'undefined') readline = (function() {
    var lines = require('fs').readFileSync('/dev/stdin').toString().split('\n');
    var id = 0;
    return function() {return lines[id++];}
})();

var x = +readline();
var a = readline().split(' ').map(function(x) { return +x; }).sort();

var ans = Infinity;
var cnt = 0;

for (var i = 0; ++i < x; ) {
    var diff = a[i] - a[i - 1];
    if (diff > ans) continue;
    if (diff < ans) {
        ans = diff;
        cnt = 0;
    }
    if (diff == ans) ++cnt;
}

print(ans + ' ' + cnt);

if (typeof print === 'undefined') print = console.log;
if (typeof readline === 'undefined') readline = (function() {
    var lines = require('fs').readFileSync('/dev/stdin').toString().split('\n');
    var id = 0;
    return function() {return lines[id++];}
})();

var x = +readline();
var a = readline().split(' ').map(function(x) { return +x; }).sort();

var ans = 1e10;
var cnt = 0;

for (var i = 0; ++i < x; ) {
    var diff = a[i] - a[i - 1];
    if (diff > ans) continue;
    if (diff < ans) ans = diff, cnt = 0;
    if (diff == ans) ++cnt;
}

print(ans + ' ' + cnt);

if (typeof print === 'undefined') print = console.log;
if (typeof readline === 'undefined') readline = (function() {
    var lines = require('fs').readFileSync('/dev/stdin').toString().split('\n');
    var id = 0;
    return function() {return lines[id++];}
})();

var x = +readline();
var a = readline().split(' ').map(function(x) { return +x; }).sort();

var ans = Infinity;
var cnt = 0;

for (var i = 0; ++i < x; ) {
    var diff = a[i] - a[i - 1];
    if (diff > ans) continue;
    if (diff < ans) ans = diff, cnt = 0;
    if (diff == ans) ++cnt;
}

print(ans + ' ' + cnt);