Closest bus stops

Given n distinct integer coordinates on a line, find the smallest absolute difference between any two and count how many pairs achieve it.

Easy3SortingArrayBrute forceInterviewNo attempts yetTime limit1sMemory limit128 MB

Problem

The school spent the tuition money on every building in Heukseok-dong and made the campus larger. You run the company that operates the shuttle buses, so you have to plan a new route inside the enlarged campus.

The only road built on the campus is one straight two-lane road. There is no other road. The road carries nn stops.

To design the route you wrote down the position of each of the nn stops as an integer coordinate A1,A2,,AnA_1, A_2, \dots, A_n.

Anyone who moves from one stop to another has to take the bus. You want a cheaper route, but if you remove too many stops the students get angry and you lose your job. So you decided to merge only the two closest stops into one.

Write a program that finds the smallest distance between two of the nn stops and counts the pairs of stops that are exactly that far apart.

Input

The first line contains the number of stops nn (2n50002 \le n \le 5000).

The second line contains the coordinates A1,A2,,AnA_1, A_2, \dots, A_n of the stops, separated by spaces (0Ai328000000 \le A_i \le 32800000). All coordinates are different.

Output

Print two integers separated by a space. The first integer is the smallest distance between two stops, and the second integer is the number of stop pairs at that distance.