n = int(input())
a = list(map(int,input().split()))
red = 0
ans = 0
cnt = [0]*10
for x in a:
    if x < 2800:
        cnt[x//400] +=1
    else:
        red+=1
for x in cnt:
    if x >0:ans+=1
if red >0:ans+=1

print(ans)
if red >0:ans+=red-1
print(ans)

