def get_color_num(c,L):
    if c <= L[0]:
        out=0
    elif  c > L[0] and c <= L[1] :
        out=1
    elif  c > L[1] and c <= L[2] :
        out=2
    elif  c > L[2] and c <= L[3] :
        out=3
    elif  c > L[3] and c <= L[4] :
        out=4
    elif  c > L[4] and c <= L[5] :
        out=5
    elif  c > L[5] and c <= L[6] :
        out=6
    elif  c > L[6] and c <= L[7] :
        out=7
    elif  c > L[7] and c <= L[8] :
        out=8
        
    return out

N=int(input())

A=[int(x) for x in input().split()]

L=list(range(399,3200,400))
L.extend([4800])

C_Num=[0]*9

for a in range(len(A)):
    a_temp=A[a]
    C_Num[get_color_num(a_temp,L)]+=1

#最小を求める
C_Num_min=0
for c_min in C_Num[:-1]:
    if c_min>0:
        C_Num_min+=1

#3200以上の人しかいない場合
if C_Num_min==0 and C_Num[-1]>0:
    C_Num_min+=1 

#最大を求める
C_Num_max=0

for c_max in C_Num[:-1]:
    if c_max>0:
        C_Num_max+=1
        
#全部の色にはいない場合
C_Num_max+=C_Num[-1]
if C_Num_max >7:
    C_Num_max=7
        
output=str( C_Num_min)+' '+str( C_Num_max)
print(output)