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

h = [int(i) for i in input().split()]



observatorys = [[] for i in range(n)]

for i in range(m):

    a, b = [int(x) - 1 for x in input().split()]

    if a in observatorys[b]:

        continue

    

    if b in observatorys[a]:

        continue

    

    observatorys[a].append(b)

    observatorys[b].append(a)

    

ans = 0

for i in range(n):

    flg = False

    for ob in observatorys[i]:

        if h[i] <= h[ob]:

            flg = True

            break

    if flg:

        continue

    

    ans += 1



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

h = [int(x) for x in input().split()]

observary = [[] for _ in range(n)]

for i in range(m):

    a, b = [int(x) - 1 for x in input().split()]

    observary[a].append(h[b])

    observary[b].append(h[a])

    

ans = 0

for i in range(n):

    if len(observary[i]) == 0:

        ans += 1

    elif max(observary[i]) < h[i]:

        ans += 1



print(ans)
n, m = list(map(int, input().split()))
h = [int(i) for i in input().split()]
observatorys = [[] for i in range(n)]
for i in range(m):
    a, b = [int(x) - 1 for x in input().split()]
    if a in observatorys[b]:
        continue
    if b in observatorys[a]:
        continue
    observatorys[a].append(b)
    observatorys[b].append(a)
ans = 0
for i in range(n):
    flg = False
    for ob in observatorys[i]:
        if h[i] <= h[ob]:
            flg = True
            break
    if flg:
        continue
    ans += 1
print(ans)

n, m = list(map(int, input().split()))
h = [int(x) for x in input().split()]
observary = [[] for _ in range(n)]
for i in range(m):
    a, b = [int(x) - 1 for x in input().split()]
    observary[a].append(h[b])
    observary[b].append(h[a])
ans = 0
for i in range(n):
    if len(observary[i]) == 0:
        ans += 1
    elif max(observary[i]) < h[i]:
        ans += 1
print(ans)

-h = [int(i) for i in input().split()] -observatorys = [[] for i in range(n)] +h = [int(x) for x in input().split()] +observary = [[] for _ in range(n)] -    if a in observatorys[b]: -        continue -    if b in observatorys[a]: -        continue -    observatorys[a].append(b) -    observatorys[b].append(a) +    observary[a].append(h[b]) +    observary[b].append(h[a]) -    flg = False -    for ob in observatorys[i]: -        if h[i] <= h[ob]: -            flg = True -            break -    if flg: -        continue -    ans += 1 +    if len(observary[i]) == 0: +        ans += 1 +    elif max(observary[i]) < h[i]: +        ans += 1