n=int(raw_input())
a=map(int,raw_input().split())
c=[0]*9
mx=0
for i in xrange(n):
    if 1<=a[i]<400:
        c[0]=1
    elif 400<=a[i]<800:
        c[1]=1
    elif 800<=a[i]<1200:
        c[2]=1
    elif 1200<=a[i]<1600:
        c[3]=1
    elif 1600<=a[i]<2000:
        c[4]=1
    elif 2000<=a[i]<2400:
        c[5]=1
    elif 2400<=a[i]<2800:
        c[6]=1
    elif 2800<=a[i]<3200:
        c[7]=1
    else:
        mx+=1
print sum(c),sum(c)+mx
