import sys
def maxAndMin(nums):
length = len(nums)
dp = [[-1 for i in range(j+1)] for j in range(length)]
for i in range(length):
for j in range(i+1):
if i != j:
dp[i][j] = abs(nums[i] - nums[j])
minV = sys.maxsize
maxV = -1
for i in range(length):
for j in range(i):
if dp[i][j]>maxV:
maxV=dp[i][j]
if dp[i][j]<minV:
minV=dp[i][j]
num_min = 0
num_max = 0
for i in range(length):
for j in range(i+1):
if dp[i][j]==maxV:
num_max+=1
if dp[i][j]==minV:
num_min+=1
return num_max,num_min
if __name__ == '__main__':
nums = int(input())
for line in sys.stdin:
nums = line.split()
nums = [int(x) for x in nums]
nums.sort()
print(maxAndMin(nums))