n = int(input())
a = list(map(int,input().split()))
aa=[0]*9
for i in range(n):
    x = a[i]//400 - 1
    if x<8:
        aa[x] = 1
    else:
        aa[8] += 1
print(aa)
suma = sum(aa[0:8])
if suma==0:
    mina = 1
else:
    mina = suma
maxa = min(suma+aa[8],8)
print(mina,maxa)
