import math

n = int(eval(input()))

lis = []

cou = 0

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

for i in range(n):

    if li[i] >= 3200:

        cou += 1

    else:

        if math.floor(li[i] // 400) not in lis:

            lis.append(li[i] // 400)

if len(lis) == 0:

    print((1,min(len(lis) + cou,8)))

else:

    print((len(lis),min(n,len(lis) + cou)))

n = int(eval(input()))

lis = [0,0,0,0,0,0,0,0]

pro = 0

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

for i in range(n):

	if li[i] >= 3200:

		pro += 1

	else:

		lis[(li[i])//400] = 1

su = lis.count(1)

print((max(su,1),min(su+pro,n)))
import math

n = int(eval(input()))
lis = []
cou = 0
li = list(map(int, input().split()))
for i in range(n):
    if li[i] >= 3200:
        cou += 1
    else:
        if math.floor(li[i] // 400) not in lis:
            lis.append(li[i] // 400)
if len(lis) == 0:
    print((1, min(len(lis) + cou, 8)))
else:
    print((len(lis), min(n, len(lis) + cou)))

n = int(eval(input()))
lis = [0, 0, 0, 0, 0, 0, 0, 0]
pro = 0
li = list(map(int, input().split()))
for i in range(n):
    if li[i] >= 3200:
        pro += 1
    else:
        lis[(li[i]) // 400] = 1
su = lis.count(1)
print((max(su, 1), min(su + pro, n)))

-import math - -lis = [] -cou = 0 +lis = [0, 0, 0, 0, 0, 0, 0, 0] +pro = 0 -        cou += 1 +        pro += 1 -        if math.floor(li[i] // 400) not in lis: -            lis.append(li[i] // 400) -if len(lis) == 0: -    print((1, min(len(lis) + cou, 8))) -else: -    print((len(lis), min(n, len(lis) + cou))) +        lis[(li[i]) // 400] = 1 +su = lis.count(1) +print((max(su, 1), min(su + pro, n)))