from bisect import bisect_right



n = int(eval(input()))

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



r = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]

c = [0] * 9



for score in a:

	i = bisect_right(r, score)

	c[i] += 1



ans = 8 - c[:-1].count(0)



print((max(1, ans), ans + c[8]))
n = int(eval(input()))

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

r = [0] * 9

for i in a:

    temp = i // 400

    if temp <= 8:

        r[temp] += 1

    else:

        r[8] += 1



c = sum([1 for i in r[:-1] if i != 0])

t = r[-1]



if c == 0:

    print((1, t))

else:

    print((c, c+t))
from bisect import bisect_right

n = int(eval(input()))
a = list(map(int, input().split()))
r = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
c = [0] * 9
for score in a:
    i = bisect_right(r, score)
    c[i] += 1
ans = 8 - c[:-1].count(0)
print((max(1, ans), ans + c[8]))

n = int(eval(input()))
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
    temp = i // 400
    if temp <= 8:
        r[temp] += 1
    else:
        r[8] += 1
c = sum([1 for i in r[:-1] if i != 0])
t = r[-1]
if c == 0:
    print((1, t))
else:
    print((c, c + t))

-from bisect import bisect_right - -r = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200] -c = [0] * 9 -for score in a: -    i = bisect_right(r, score) -    c[i] += 1 -ans = 8 - c[:-1].count(0) -print((max(1, ans), ans + c[8])) +r = [0] * 9 +for i in a: +    temp = i // 400 +    if temp <= 8: +        r[temp] += 1 +    else: +        r[8] += 1 +c = sum([1 for i in r[:-1] if i != 0]) +t = r[-1] +if c == 0: +    print((1, t)) +else: +    print((c, c + t))