N = int(input())
rate = list(map(int,input().split()))
lst = [i*400 for i in range(9)]
lstc = [0]*9
#print(lst)
for i in rate:
    for j in range(len(lst)):
        if abs(i-lst[j]) < 400:
            lstc[j] += 1
            break
        # elif i > 3199:
        #     lstc[-1] += 1
        #     break
#print(lstc)
n = 0
for i in lstc:
    if i > 0:
        n += 1
nx = n-1

#print(lstc[-1] - nx)

if lstc[-1] == 0:
    print(n,n)
elif lstc[-1] + nx >= 8:
    print(nx,8)
else:
    print(nx,nx+lstc[-1])
            