N=int(input())
A=list(map(int,input().split()))

X=[0]*8
Y=0

for a in A:
    if a>=3200:
        Y+=1
    else:
        X[a//400]+=1
        
if Y==N:
    print(1,min(8,N))
else:
    a=8-X.count(0)
    b=min(8,a+Y)
    print(a,b)
