N, T = [int(v) for v in input().split()]

a = [int(v) for v in input().split()]



max_profit = 0

ans = 1

left = 0

right = 1



while right < N:

    if a[left] < a[right]:

        profit = a[right] - a[left]

        if profit == max_profit:

            ans += 1

        else:

            max_profit = max(max_profit, profit)

    else:

        left = right

    right += 1



print(ans)

N, T = [int(v) for v in input().split()]

a = [int(v) for v in input().split()]



max_profit = 0

ans = 1

left = 0

right = 1



min_a = a[0]

for i in range(1, N):

    if min_a < a[i]:

        profit = a[i] - min_a

        if profit == max_profit:

            ans += 1

        else:

            max_profit = max(max_profit, profit)

    else:

        min_a = min(min_a, a[i])



print(ans)

N, T = [int(v) for v in input().split()]
a = [int(v) for v in input().split()]
max_profit = 0
ans = 1
left = 0
right = 1
while right < N:
    if a[left] < a[right]:
        profit = a[right] - a[left]
        if profit == max_profit:
            ans += 1
        else:
            max_profit = max(max_profit, profit)
    else:
        left = right
    right += 1
print(ans)

N, T = [int(v) for v in input().split()]
a = [int(v) for v in input().split()]
max_profit = 0
ans = 1
left = 0
right = 1
min_a = a[0]
for i in range(1, N):
    if min_a < a[i]:
        profit = a[i] - min_a
        if profit == max_profit:
            ans += 1
        else:
            max_profit = max(max_profit, profit)
    else:
        min_a = min(min_a, a[i])
print(ans)

-while right < N: -    if a[left] < a[right]: -        profit = a[right] - a[left] +min_a = a[0] +for i in range(1, N): +    if min_a < a[i]: +        profit = a[i] - min_a -        left = right -    right += 1 +        min_a = min(min_a, a[i])