N=int(input())
a=list(map(int, input().split()))
A=[0]*8
G=0
for i in range(N):
    if a[i]<400:
        A[0]+=1
    elif a[i]<800:
        A[1]+=1
    elif a[i]<1200:
        A[2]+=1
    elif a[i]<1600:
        A[3]+=1
    elif a[i]<2000:
        A[4]+=1
    elif a[i]<2400:
        A[5]+=1
    elif a[i]<2800:
        A[6]+=1
    elif a[i]<3200:
        A[7]+=1
    else:
        G+=1
t=0
for i in range(8):
    if A[i]>0:
        t+=1
print(t,t+G)
