from collections import Counter



N = int(eval(input()))

A = (int(i) // 400 for i in input().split())



mi, d = 0, 0

for k, v in list(Counter(A).items()):

    if k >= 8:

        d += v

    else:

        mi += 1



if mi == 0:

    print((1, N))

else:

    print((mi, mi + d))
N = int(eval(input()))

A = (int(i) // 400 for i in input().split())



m, d = [0] * 8, 0

for a in A:

    if a >= 8:

        d += 1

    else:

        m[a] = 1

s = sum(m)

if s > 0:

    print((s, s + d))

else:

    print((1, N))

from collections import Counter

N = int(eval(input()))
A = (int(i) // 400 for i in input().split())
mi, d = 0, 0
for k, v in list(Counter(A).items()):
    if k >= 8:
        d += v
    else:
        mi += 1
if mi == 0:
    print((1, N))
else:
    print((mi, mi + d))

N = int(eval(input()))
A = (int(i) // 400 for i in input().split())
m, d = [0] * 8, 0
for a in A:
    if a >= 8:
        d += 1
    else:
        m[a] = 1
s = sum(m)
if s > 0:
    print((s, s + d))
else:
    print((1, N))

-from collections import Counter - -mi, d = 0, 0 -for k, v in list(Counter(A).items()): -    if k >= 8: -        d += v +m, d = [0] * 8, 0 +for a in A: +    if a >= 8: +        d += 1 -        mi += 1 -if mi == 0: +        m[a] = 1 +s = sum(m) +if s > 0: +    print((s, s + d)) +else: -else: -    print((mi, mi + d))