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

ans = [0]*8
free = 0
for a in A:
    for i in range(8):
        if a < (i+1)*400:
            ans[i]=1
            break
    if 3200 <= a:
        free += 1
ans_max = min(8, sum(ans)+free)
ans_min = sum(ans)
print(ans_min, ans_max, sep=' ')