n = int(eval(input()))

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

from collections import defaultdict

d = defaultdict(int)

over = 0

for i in a:

    lv = i//400

    if lv < 3200//400 and not d[lv]:

        d[lv] = True

    if lv >= 3200//400:

        over += 1



syurui = sum(d.values())

print((max(1, syurui), syurui+over))
n = int(eval(input()))

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

d = [0]*8

over = 0

for i in a:

    lv = i//400

    if lv < 8:

        d[lv] = 1

    else:

        over += 1



print((max(sum(d), 1), sum(d)+over))
n = int(eval(input()))
a = list(map(int, input().split()))
from collections import defaultdict

d = defaultdict(int)
over = 0
for i in a:
    lv = i // 400
    if lv < 3200 // 400 and not d[lv]:
        d[lv] = True
    if lv >= 3200 // 400:
        over += 1
syurui = sum(d.values())
print((max(1, syurui), syurui + over))

n = int(eval(input()))
a = list(map(int, input().split()))
d = [0] * 8
over = 0
for i in a:
    lv = i // 400
    if lv < 8:
        d[lv] = 1
    else:
        over += 1
print((max(sum(d), 1), sum(d) + over))

-from collections import defaultdict - -d = defaultdict(int) +d = [0] * 8 -    if lv < 3200 // 400 and not d[lv]: -        d[lv] = True -    if lv >= 3200 // 400: +    if lv < 8: +        d[lv] = 1 +    else: -syurui = sum(d.values()) -print((max(1, syurui), syurui + over)) +print((max(sum(d), 1), sum(d) + over))