N = int(input())
A = [int(i) for i in input().split()]

L = [0 for i in range(9)] 

for i in A:
    if 1 <= i <= 399:
        L[0] += 1
    if 400 <= i <= 799:
        L[1] += 1
    if 800 <= i <= 1199:
        L[2] += 1
    if 1200 <= i <= 1599:
        L[3] += 1
    if 1600 <= i <= 1999:
        L[4] += 1
    if 2000 <= i <= 2399:
        L[5] += 1
    if 2400 <= i <= 2799:
        L[6] += 1
    if 2800 <= i <= 3199:
        L[7] += 1
    if 3200 <= i:
        L[8] += 1
        
count_0 = L[0:8].count(0)
count_not_0 = 8 - count_0
count_strong = L[8]

if count_not_0 == 0:
    if count_strong >= 1:
        print(1, min(count_strong, 8))
    else:
        print(0, 0)
else:
    if count_strong == 0:
        print(count_not_0, count_not_0)
    else:
        print(count_not_0, min(8, count_not_0 + min(count_0, count_strong)))