N = int(input())
a = list(map(int, input().split()))
score = [[1,399,0],[400,799,0],[800,1199,0],[1200,1599,0],[1600,1999,0],[2000,2399,0],[2400,2799,0],[2800,3199,0],[3200,4800,0]]

for i in range(N):
    for j in range(len(score)):
        if score[j][0] <= a[i] <= score[j][1]:
            score[j][2] = 1
            break
        else:
            continue
ans = 0
for _,_,cnt in score:
    if cnt >= 1:
        ans += 1
if score[-1][2] != 0:
    print(max(1, ans-cnt), min(8, ans+cnt))
else:
    print(ans, ans)