n=int(input())
a=list(map(int,input().split()))
gray=brown=green=cyan=blue=yellow=orange=red=num=0
for i in range(n):
    if 1<=a[i]<=399:
        gray=1
    if 400<=a[i]<=799:
        brown=1
    if 800<=a[i]<=1199:
        green=1
    if 1200<=a[i]<=1599:
        cyan=1
    if 1600<=a[i]<=1999:
        blue=1
    if 2000<=a[i]<=2399:
        yellow=1
    if 2400<=a[i]<=2799:
        orange=1
    if 2800<=a[i]<=3199:
        red=1
    if 3200<=a[i]:
        num+=1
total=gray+brown+green+cyan+blue+yellow+orange+red
if total==0:
    print(num,num)
else:
    print(total,total+num)