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

color=[-1]*n
free=0
count=0
for i in range(len(a)):
    if a[i]<3200:
        #print(a[i])
        for j in range(8):
            if 400*j<=a[i] and 400*(j+1)>a[i] and j not in color:
                color[i]=j
                break
            else:
                color[i]=0
                
    
    else:
        free+=1
        
for i in color:
    if i>0 :
        count+=1

#print(count,free)
#print(color)
Sans,Mans=0,0
if count+free>8:
    Mans=8
else:
    Mans=count+free
    
if count==0:
    Sans=1
else:
    Sans=count
    
print(Sans,Mans)