N=int(input())
a=input().split()
b=[int(c) for c in a]
list1=[0]*8
number=0
for d in b:
    if 1<=d and 399>=d:
        list1[0]+=1
    elif 400<=d and d<=799:
        list1[1]+=1
    elif 800<=d and d<=1199:
        list1[2]+=1
    elif 1200<=d and d<=1599:
        list1[3]+=1
    elif 1600<=d and d<=1999:
        list1[4]+=1
    elif 2000<=d and d<=2399:
        list1[5]+=1
    elif 2400<=d and d<=2799:
        list1[6]+=1
    elif 2800<=d and d<=3199:
        list1[7]+=1
    else:
        number+=1
while 0 in list1:
    list1.remove(0)
if len(list1)==8:
    print('8 8')
else:
    if number>0:
        if len(list1)+number>=8:
            print(str(len(list1))+' '+str(8))
        else:
            print(str(len(list1))+' '+str(len(list1)+number))
    else:
        print(str(len(list1))+' '+str(len(list1)))
