N=int(input())
a=list(map(int,input().split()))
b,c=[],0
b.append(len([a for a in a if a<400]))
b.append(len([a for a in a if a<800 and a>=400]))
b.append(len([a for a in a if a<1200 and a>=800]))
b.append(len([a for a in a if a<1600 and a>=1200]))
b.append(len([a for a in a if a<2000 and a>=1600]))
b.append(len([a for a in a if a<2400 and a>=2000]))
b.append(len([a for a in a if a<2800 and a>=2400]))
b.append(len([a for a in a if a<3200 and a>=2800]))
b.append(len([a for a in a if a>=3200]))
for i in range(8):
    if b[i]>0:
        c+=1
if b[8]>0:
    print(c,c+b[8])
else:
    print(c,c)