import sys
N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))
maxA = max(A)
L=[0 for _ in range(9)]
for a in A:
    if a <=399:
        L[0]+=1
    elif a <=799:
        L[1]+=1
    elif a <=1199:
        L[2]+=1
    elif a <=1599:
        L[3]+=1
    elif a <=1999:
        L[4]+=1
    elif a <=2399:
        L[5]+=1
    elif a <=2799:
        L[6]+=1
    elif a <=3199:
        L[7]+=1
    else:
        L[8]+=1
cnt=0
for i in range(8):
    if L[i] !=0:
        cnt+=1
zero_cnt = 8-cnt
Max = cnt + min(zero_cnt, L[8])
if cnt==0 and L[8]>0:
    cnt+=1
print(cnt, Max)