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

judge = [1,399,799,1199,1599,1999,2399,2799,3199]
color = [0]*(len(judge)-1)
count = 0

for i in range(len(a)):
    if a[i] >= 3200:
        count += 1
    else:
        for j in range(len(judge)):
            if a[i] <= judge[j] and a[i] > judge[j-1]:
                color[j-1] = 'a'
cnt_a = 0
for i in range(len(color)):
    if color[i] == 'a':
        cnt_a += 1
min = cnt_a
if cnt_a+count >= len(color):
    max = len(color)
else:
    max = cnt_a+count
print(min,max)