N = int(input())
a = list(map(int,input().split()))
ranking = [0]*8
cnt=0
for i in range(N):
    if 1<=a[i]<=399:
        ranking[0]+=1
    if 400 <= a[i] <= 799:
        ranking[1] += 1
    if 800 <= a[i] <= 1199:
        ranking[2] += 1
    if 1200 <= a[i] <= 1599:
        ranking[3] += 1
    if 1600 <= a[i] <= 1999:
        ranking[4] += 1
    if 2000 <= a[i] <= 2399:
        ranking[5] += 1
    if 2400 <= a[i] <= 2799:
        ranking[6] += 1
    if 2800 <= a[i] <= 3199:
        ranking[7] += 1
    if 3200<= a[i]:
        cnt+=1
x,y=0,0
for i in range(8):
    if ranking[i]==0:
        x+=1
print((8-x),(8+cnt-x)) if cnt<8-x else print((8-x),(8))