from collections import defaultdict



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

*a, = list(map(int, input().split()))

t = defaultdict(int)

m = a[0]

p = 0

ans = 0

for i in range(1, N):

    c = a[i] - m

    if t[m] < c:

        t[m] = c

    if a[i] < m:

        m = a[i]

    if c > p:

        p = c

        ans = 1

    elif c == p:

        ans += 1



print(ans)

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

*a, = list(map(int, input().split()))

m = a[0]

p = 0

ans = 0

for i in range(1, N):

    c = a[i] - m

    if a[i] < m:

        m = a[i]

    if c > p:

        p = c

        ans = 1

    elif c == p:

        ans += 1



print(ans)

from collections import defaultdict

N, T = list(map(int, input().split()))
(*a,) = list(map(int, input().split()))
t = defaultdict(int)
m = a[0]
p = 0
ans = 0
for i in range(1, N):
    c = a[i] - m
    if t[m] < c:
        t[m] = c
    if a[i] < m:
        m = a[i]
    if c > p:
        p = c
        ans = 1
    elif c == p:
        ans += 1
print(ans)

N, T = list(map(int, input().split()))
(*a,) = list(map(int, input().split()))
m = a[0]
p = 0
ans = 0
for i in range(1, N):
    c = a[i] - m
    if a[i] < m:
        m = a[i]
    if c > p:
        p = c
        ans = 1
    elif c == p:
        ans += 1
print(ans)

-from collections import defaultdict - -t = defaultdict(int) -    if t[m] < c: -        t[m] = c