n = int(input())
a = list(map(int,input().split()))

scr = [400,800,1200,1600,2000,2400,2800,3200,5000]
li = [0,0,0,0,0,0,0,0,0]

for i in range(n):
    for j in range(len(scr)):
        if a[i] < scr[j]:
            li[j] += 1
            break

ans = 0
for i in range(len(li)-1):
    if li[i]>0:
        ans += 1

if li[8]:
    ans_M = min(ans+li[8],8)
    ans_m = max(ans,1)
else:
    ans_M = ans
    ans_m = ans

print(ans_m,ans_M)