N=int(input())
a=list(map(int,input().split()))
colors=[]
for i in range(N):
    if a[i]<400:
        colors.append('gray')
    elif a[i]<800:
        colors.append('brown')
    elif a[i]<1200:
        colors.append('green')
    elif a[i]<1600:
        colors.append('mizu')
    elif a[i]<2000:
        colors.append('blue')
    elif a[i]<2400:
        colors.append('yelow')
    elif a[i]<2800:
        colors.append('orange')
    elif a[i]<3200:
        colors.append('red')
    else:
        colors.append('free')
kinds=list(set(colors))
if 'free' not in kinds:
    print(str(len(kinds))+' '+str(len(kinds)))
else:
    ans=len(kinds)-1
    bb=colors.count('free')
    if ans+bb>8:
        print(str(ans)+' '+str(8))
    else:
        print(str(ans)+' '+str(ans+bb))