# coding: utf-8
# Your code here!
N=int(input())
A=list(map(int,input().split()))
l=[0]*8
for a in A:
    if a>=2800:
        l[7]+=1
    else:
        l[int(a//400)]=1

print(sum(l)-l[7]+min(1,l[7]),min(sum(l),8))
