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

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

A = []

B = []

h_new = [0]*n

c = 0

for i in range(m):

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

    A += [a]

    B += [b]

    

for i in range(m):

    h_new[A[i]-1] = max(h[B[i]-1],h_new[A[i]-1])

    h_new[B[i]-1] = max(h_new[B[i]-1],h[A[i]-1])

    

for i in range(n):

    if h[i] > h_new[i]:

        c += 1

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

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

l = [1]*n

for i in range(m):

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

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

        l[b-1] = 0

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

        l[a-1] = 0

    else:

        l[a-1] = l[b-1] = 0

        

print((sum(l)))

n, m = list(map(int, input().split()))
h = list(map(int, input().split()))
A = []
B = []
h_new = [0] * n
c = 0
for i in range(m):
    a, b = list(map(int, input().split()))
    A += [a]
    B += [b]
for i in range(m):
    h_new[A[i] - 1] = max(h[B[i] - 1], h_new[A[i] - 1])
    h_new[B[i] - 1] = max(h_new[B[i] - 1], h[A[i] - 1])
for i in range(n):
    if h[i] > h_new[i]:
        c += 1
print(c)

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

-A = [] -B = [] -h_new = [0] * n -c = 0 +l = [1] * n -    A += [a] -    B += [b] -for i in range(m): -    h_new[A[i] - 1] = max(h[B[i] - 1], h_new[A[i] - 1]) -    h_new[B[i] - 1] = max(h_new[B[i] - 1], h[A[i] - 1]) -for i in range(n): -    if h[i] > h_new[i]: -        c += 1 -print(c) +    if h[a - 1] > h[b - 1]: +        l[b - 1] = 0 +    elif h[b - 1] > h[a - 1]: +        l[a - 1] = 0 +    else: +        l[a - 1] = l[b - 1] = 0 +print((sum(l)))