import itertools
import sys
n=int(input())
a=list(map(int,input().split()))
free=[i for i in a if i>=3200]
rate=[399,799,1199,1599,1999,2399,2799,3199]
ans=0
before=0
for r in rate:
    for i in a:
        if before<i <=r:
            ans+=1
            before=r
            break

print(ans,min(8,ans+len(free)))
