n=int(input())
A=map(int,input().split())
count={}
ziyuu=0
for a in A:
    if 1<=a<=399:
        count['灰色']=1
    elif 400<=a<=799:
        count['茶色']=1   
    elif 800<=a<=1199:
        count['緑色']=1 
    elif 1200<=a<=1599:
        count['水色']=1 
    elif 1600<=a<=1999:
        count['青色']=1 
    elif 2000<=a<=2399:
        count['黄色']=1 
    elif 2400<=a<=2799:
        count['橙色']=1 
    elif 2800<=a<=3199:
        count['赤色']=1 
    elif 3200<=a:
        ziyuu+=1
mi=len(count)
ma=min(8,mi+ziyuu)
print(mi,ma)
