{"raw_statement":[{"iden":"statement","content":"There are _n_ cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers _a_1, _a_2, ..., _a__n_. All coordinates are pairwise distinct.\n\nIt is possible to get from one city to another only by bus. But all buses and roads are very old, so the Minister of Transport decided to build a new bus route. The Minister doesn't want to spend large amounts of money — he wants to choose two cities in such a way that the distance between them is minimal possible. The distance between two cities is equal to the absolute value of the difference between their coordinates.\n\nIt is possible that there are multiple pairs of cities with minimal possible distance, so the Minister wants to know the quantity of such pairs.\n\nYour task is to write a program that will calculate the minimal possible distance between two pairs of cities and the quantity of pairs which have this distance."},{"iden":"input","content":"The first line contains one integer number _n_ (2 ≤ _n_ ≤ 2·105).\n\nThe second line contains _n_ integer numbers _a_1, _a_2, ..., _a__n_ ( - 109 ≤ _a__i_ ≤ 109). All numbers _a__i_ are pairwise distinct."},{"iden":"output","content":"Print two integer numbers — the minimal distance and the quantity of pairs with this distance."},{"iden":"examples","content":"Input\n\n4\n6 -3 0 4\n\nOutput\n\n2 1\n\nInput\n\n3\n-2 0 2\n\nOutput\n\n2 2"},{"iden":"note","content":"In the first example the distance between the first city and the fourth city is |4 - 6| = 2, and it is the only pair with this distance."}],"translated_statement":[{"iden":"statement","content":"伯兰主路上有 #cf_span[n] 座城市。城市用它们的坐标表示——整数 #cf_span[a1, a2, ..., an]。所有坐标两两不同。\n\n只能通过巴士在城市之间通行。但由于所有巴士和道路都非常老旧，交通部长决定修建一条新的巴士线路。部长不想花费大量资金——他希望选择两座城市，使得它们之间的距离尽可能小。两座城市之间的距离等于它们坐标差的绝对值。\n\n可能存在多对城市具有最小可能距离，因此部长想知道有多少对这样的城市。\n\n你的任务是编写一个程序，计算两座城市之间的最小可能距离，以及具有该距离的城市对的数量。\n\n第一行包含一个整数 #cf_span[n] (#cf_span[2 ≤ n ≤ 2·105])。\n\n第二行包含 #cf_span[n] 个整数 #cf_span[a1, a2, ..., an] (#cf_span[ - 109 ≤ ai ≤ 109])。所有 #cf_span[ai] 两两不同。\n\n请输出两个整数：最小距离和具有该距离的城市对的数量。\n\n在第一个示例中，第一座城市与第四座城市之间的距离为 #cf_span[|4 - 6| = 2]，且这是唯一一对具有该距离的城市。"},{"iden":"input","content":"第一行包含一个整数 #cf_span[n] (#cf_span[2 ≤ n ≤ 2·105])。第二行包含 #cf_span[n] 个整数 #cf_span[a1, a2, ..., an] (#cf_span[ - 109 ≤ ai ≤ 109])。所有 #cf_span[ai] 两两不同。"},{"iden":"output","content":"请输出两个整数：最小距离和具有该距离的城市对的数量。"},{"iden":"examples","content":"输入\n4\n6 -3 0 4\n输出\n2 1\n\n输入\n3\n-2 0 2\n输出\n2 2"},{"iden":"note","content":"在第一个示例中，第一座城市与第四座城市之间的距离为 #cf_span[|4 - 6| = 2]，且这是唯一一对具有该距离的城市。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ with $ 2 \\leq n \\leq 2 \\cdot 10^5 $.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of pairwise distinct integers, where $ -10^9 \\leq a_i \\leq 10^9 $.\n\n**Constraints**  \nAll $ a_i $ are distinct.\n\n**Objective**  \nLet $ D = \\{ |a_i - a_j| \\mid 1 \\leq i < j \\leq n \\} $.  \nCompute:  \n- $ d_{\\min} = \\min D $,  \n- $ c = \\left| \\{ (i,j) \\mid 1 \\leq i < j \\leq n,\\ |a_i - a_j| = d_{\\min} \\} \\right| $.  \n\nOutput $ d_{\\min} $ and $ c $.","simple_statement":null,"has_page_source":false}