N, T = list(map(int, input().split()))

A = [int(x) for x in input().split()]

buy = A[0]

max_profit = 0

ans = 1

for i in range(1,N):

    if A[i] > buy:

        if A[i] - buy > max_profit:

            max_profit = A[i] - buy

            ans = 1

        elif A[i] - buy == max_profit:

            ans += 1

    else:

        buy = A[i]

print(ans)

N, T = list(map(int, input().split()))

A = [int(x) for x in input().split()]

cost, buy, mprofit = 1, 10e9, 0

for a in A:

    if a < buy:

        buy = a

    else:

        profit = a - buy

        if profit == mprofit:

            cost += 1

        if profit > mprofit:

            mprofit = profit

            cost = 1

print(cost)
N, T = list(map(int, input().split()))
A = [int(x) for x in input().split()]
buy = A[0]
max_profit = 0
ans = 1
for i in range(1, N):
    if A[i] > buy:
        if A[i] - buy > max_profit:
            max_profit = A[i] - buy
            ans = 1
        elif A[i] - buy == max_profit:
            ans += 1
    else:
        buy = A[i]
print(ans)

N, T = list(map(int, input().split()))
A = [int(x) for x in input().split()]
cost, buy, mprofit = 1, 10e9, 0
for a in A:
    if a < buy:
        buy = a
    else:
        profit = a - buy
        if profit == mprofit:
            cost += 1
        if profit > mprofit:
            mprofit = profit
            cost = 1
print(cost)

-buy = A[0] -max_profit = 0 -ans = 1 -for i in range(1, N): -    if A[i] > buy: -        if A[i] - buy > max_profit: -            max_profit = A[i] - buy -            ans = 1 -        elif A[i] - buy == max_profit: -            ans += 1 +cost, buy, mprofit = 1, 10e9, 0 +for a in A: +    if a < buy: +        buy = a -        buy = A[i] -print(ans) +        profit = a - buy +        if profit == mprofit: +            cost += 1 +        if profit > mprofit: +            mprofit = profit +            cost = 1 +print(cost)