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

A = list(map(int,input().split()))

dif = []

max_A = 0

for i in range(N):

    max_A = max(max_A,A[-1-i])

    dif.append(max_A-A[-1-i])

ans = 0

dif.sort(reverse=True)

for i in range(N-1):

    if dif[i]!=dif[i+1]:

        print((i+1))

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

A = list(map(int, input().split()))



lo = 10**18

hi = 0

d = 0

res = 0





for i in range(N):

    if lo > A[i]:

        lo = A[i]

        hi = 0

    if hi < A[i]:

        hi = A[i]

        if d == hi - lo:

            res += 1

        elif d < hi - lo:

            d = hi - lo

            res = 1



print(res)
N, T = list(map(int, input().split()))
A = list(map(int, input().split()))
dif = []
max_A = 0
for i in range(N):
    max_A = max(max_A, A[-1 - i])
    dif.append(max_A - A[-1 - i])
ans = 0
dif.sort(reverse=True)
for i in range(N - 1):
    if dif[i] != dif[i + 1]:
        print((i + 1))
        break

N, T = list(map(int, input().split()))
A = list(map(int, input().split()))
lo = 10**18
hi = 0
d = 0
res = 0
for i in range(N):
    if lo > A[i]:
        lo = A[i]
        hi = 0
    if hi < A[i]:
        hi = A[i]
        if d == hi - lo:
            res += 1
        elif d < hi - lo:
            d = hi - lo
            res = 1
print(res)

-dif = [] -max_A = 0 +lo = 10**18 +hi = 0 +d = 0 +res = 0 -    max_A = max(max_A, A[-1 - i]) -    dif.append(max_A - A[-1 - i]) -ans = 0 -dif.sort(reverse=True) -for i in range(N - 1): -    if dif[i] != dif[i + 1]: -        print((i + 1)) -        break +    if lo > A[i]: +        lo = A[i] +        hi = 0 +    if hi < A[i]: +        hi = A[i] +        if d == hi - lo: +            res += 1 +        elif d < hi - lo: +            d = hi - lo +            res = 1 +print(res)