N = int(input())
A = list(map(int,input().split()))
from collections import defaultdict
B = defaultdict(int)
for i in A:
    B[min(8,i//400)]+=1
ans = 0
jiyuu = 0
for i in B:
    if i != 8:
        ans += 1
    else:
        jiyuu = B[i]
        
print(*[ans,min(8,ans+jiyuu)])