n = int(input())
a_input=list(map(int,input().split()))

rate_li=[0]*9
top_coder=0
for a in a_input:
    rate_li[min(a//400,8)]+=1
print(rate_li)
min_ = sum(i!=0 for i in rate_li[:8])
print(max(min_,1),min_+rate_li[-1])