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

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

B = [(0,-1) for _ in range(N)]

amax = A[-1]

ind = N-1

bmax = 0

for i in range(N-2,-1,-1):

    a = A[i]

    if a>amax:

        amax = a

        ind = i

    else:

        B[i] = (amax-a,ind)

        if bmax<amax-a:

            bmax = amax-a

C = []

for i in range(N):

    if B[i][0]==bmax:

        if B[i][1] not in C:

            C.append(B[i][1])

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

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

C = {}

amin = A[0]

for i in range(1,N):

    a = A[i]

    if a>amin:

        b = a-amin

        if b not in C:

            C[b] = []

        C[b].append(i)

    elif a==amin:

        continue

    else:

        amin = a

C = sorted(list(C.items()),key=lambda x:x[0],reverse=True)

print((len(C[0][1])))
N, T = list(map(int, input().split()))
A = list(map(int, input().split()))
B = [(0, -1) for _ in range(N)]
amax = A[-1]
ind = N - 1
bmax = 0
for i in range(N - 2, -1, -1):
    a = A[i]
    if a > amax:
        amax = a
        ind = i
    else:
        B[i] = (amax - a, ind)
        if bmax < amax - a:
            bmax = amax - a
C = []
for i in range(N):
    if B[i][0] == bmax:
        if B[i][1] not in C:
            C.append(B[i][1])
print((len(C)))

N, T = list(map(int, input().split()))
A = list(map(int, input().split()))
C = {}
amin = A[0]
for i in range(1, N):
    a = A[i]
    if a > amin:
        b = a - amin
        if b not in C:
            C[b] = []
        C[b].append(i)
    elif a == amin:
        continue
    else:
        amin = a
C = sorted(list(C.items()), key=lambda x: x[0], reverse=True)
print((len(C[0][1])))

-B = [(0, -1) for _ in range(N)] -amax = A[-1] -ind = N - 1 -bmax = 0 -for i in range(N - 2, -1, -1): +C = {} +amin = A[0] +for i in range(1, N): -    if a > amax: -        amax = a -        ind = i +    if a > amin: +        b = a - amin +        if b not in C: +            C[b] = [] +        C[b].append(i) +    elif a == amin: +        continue -        B[i] = (amax - a, ind) -        if bmax < amax - a: -            bmax = amax - a -C = [] -for i in range(N): -    if B[i][0] == bmax: -        if B[i][1] not in C: -            C.append(B[i][1]) -print((len(C))) +        amin = a +C = sorted(list(C.items()), key=lambda x: x[0], reverse=True) +print((len(C[0][1])))