n = int(input())
a = [int(i) for i in input().split()]

ans = 0
a_1 = 0
a_2 = 0
a_3 = 0
a_4 = 0
a_5 = 0
a_6 = 0
a_7 = 0
a_8 = 0
add = 0
for i in range(n):
    if a[i]  < 400 and a_1 == 0:
        a_1 = 1
        ans +=1
    elif a[i]  < 800 and a[i] >= 400 and a_2 == 0:
        a_2 = 1
        ans +=1
    elif a[i]  < 1200 and a[i] >= 800 and a_3 == 0:
        a_3 = 1
        ans +=1
    elif a[i]  < 1600 and a[i] >= 1200 and a_4 == 0:
        a_4 = 1
        ans +=1
    elif a[i]  < 2000 and a[i] >= 1600 and a_5 == 0:
        a_5 = 1
        ans +=1
    elif a[i]  < 2400 and a[i] >= 2000 and a_6 == 0:
        a_6 = 1
        ans +=1
    elif a[i]  < 2800 and a[i] >= 2400 and a_7 == 0:
        a_7 = 1
        ans +=1
    elif a[i]  < 3200 and a[i] >= 2800 and a_8 == 0:
        a_8 = 1
        ans +=1
    elif a[i] >= 3200:
        add +=1
if ans >= 8:
    print('8 8')
elif ans + add >= 8:
    print(str(ans)+' 8')
else:
    print(str(ans)+' '+str(ans+add))