from collections import defaultdict

N = int(eval(input()))

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



d = defaultdict(int)

strong = 0



for a in A:

    if a >= 3200:

        strong += 1

        continue

    d[a // 400] += 1



Cmin = max(len(d), 1)

Cmax = len(d) + strong

print((Cmin, Cmax))
N = int(eval(input()))

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



d = [0] * 9

for a in A:

    if a < 400:

        d[0] = 1

    elif a < 800:

        d[1] = 1

    elif a < 1200:

        d[2] = 1

    elif a < 1600:

        d[3] = 1

    elif a < 2000:

        d[4] = 1

    elif a < 2400:

        d[5] = 1

    elif a < 2800:

        d[6] = 1

    elif a < 3200:

        d[7] = 1

    else:

        d[8] += 1



base = sum(d[:-1])

mx = base + d[8]

mn = max(1, base)

print((mn, mx))
from collections import defaultdict

N = int(eval(input()))
A = list(map(int, input().split()))
d = defaultdict(int)
strong = 0
for a in A:
    if a >= 3200:
        strong += 1
        continue
    d[a // 400] += 1
Cmin = max(len(d), 1)
Cmax = len(d) + strong
print((Cmin, Cmax))

N = int(eval(input()))
A = list(map(int, input().split()))
d = [0] * 9
for a in A:
    if a < 400:
        d[0] = 1
    elif a < 800:
        d[1] = 1
    elif a < 1200:
        d[2] = 1
    elif a < 1600:
        d[3] = 1
    elif a < 2000:
        d[4] = 1
    elif a < 2400:
        d[5] = 1
    elif a < 2800:
        d[6] = 1
    elif a < 3200:
        d[7] = 1
    else:
        d[8] += 1
base = sum(d[:-1])
mx = base + d[8]
mn = max(1, base)
print((mn, mx))

-from collections import defaultdict - -d = defaultdict(int) -strong = 0 +d = [0] * 9 -    if a >= 3200: -        strong += 1 -        continue -    d[a // 400] += 1 -Cmin = max(len(d), 1) -Cmax = len(d) + strong -print((Cmin, Cmax)) +    if a < 400: +        d[0] = 1 +    elif a < 800: +        d[1] = 1 +    elif a < 1200: +        d[2] = 1 +    elif a < 1600: +        d[3] = 1 +    elif a < 2000: +        d[4] = 1 +    elif a < 2400: +        d[5] = 1 +    elif a < 2800: +        d[6] = 1 +    elif a < 3200: +        d[7] = 1 +    else: +        d[8] += 1 +base = sum(d[:-1]) +mx = base + d[8] +mn = max(1, base) +print((mn, mx))