n, m = list(map(int, input().split()))

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

way = [list(map(int, input().split())) for _ in range(m)]



ans = [0]*n

for w in way:

    a = w[0]

    b = w[1]

    if h[a-1] < h[b-1]:

        ans[a-1] += 1

    elif h[a-1] > h[b-1]:

        ans[b-1] += 1

    else:

        ans[a-1] += 1

        ans[b-1] += 1



count = 0

for a in ans:

    if a == 0:

        count += 1

print(count)
n, m = list(map(int, input().split()))

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



ans = [0]*n

for i in range(m):

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

    if h[a-1] < h[b-1]:

        ans[a-1] += 1

    elif h[a-1] > h[b-1]:

        ans[b-1] += 1

    else:

        ans[a-1] += 1

        ans[b-1] += 1



print((ans.count(0)))
n, m = list(map(int, input().split()))
h = list(map(int, input().split()))
way = [list(map(int, input().split())) for _ in range(m)]
ans = [0] * n
for w in way:
    a = w[0]
    b = w[1]
    if h[a - 1] < h[b - 1]:
        ans[a - 1] += 1
    elif h[a - 1] > h[b - 1]:
        ans[b - 1] += 1
    else:
        ans[a - 1] += 1
        ans[b - 1] += 1
count = 0
for a in ans:
    if a == 0:
        count += 1
print(count)

n, m = list(map(int, input().split()))
h = list(map(int, input().split()))
ans = [0] * n
for i in range(m):
    a, b = list(map(int, input().split()))
    if h[a - 1] < h[b - 1]:
        ans[a - 1] += 1
    elif h[a - 1] > h[b - 1]:
        ans[b - 1] += 1
    else:
        ans[a - 1] += 1
        ans[b - 1] += 1
print((ans.count(0)))

-way = [list(map(int, input().split())) for _ in range(m)] -for w in way: -    a = w[0] -    b = w[1] +for i in range(m): +    a, b = list(map(int, input().split())) -count = 0 -for a in ans: -    if a == 0: -        count += 1 -print(count) +print((ans.count(0)))