N=int(input())

S=list(map(int, input().split()))

T=[0]*8
for i in range(N):
    if S[i] < 400:
        T[0]+=1
    elif S[i] < 800:
        T[1]+=1
    elif S[i] < 1200:
        T[2]+=1
    elif S[i] < 1600:
        T[3]+=1
    elif S[i] < 2000:
        T[4]+=1
    elif S[i] < 2400:
        T[5]+=1
    elif S[i] < 2800:
        T[6]+=1
    elif S[i] >= 3200:
        T[7]+=1

K=0
for i in range(8):
    if T[i] >= 1:
        K+=1

print(K,K+T[7])
