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 28001 <= i <= 3199:
        L[7] += 1
    if 3200 <= i:
        L[8] += 1
        
count_0 = L[0:8].count(0)
count_strong = L[8]
if count_strong >= 1:
    print(8-count_0, 8-count_0+min(2, max(count_strong, count_0)))
else:
    print(8-count_0, 8-count_0)