N = int(input())
A = list(map(int,input().split()))
B = [0,0,0,0,0,0,0,0]
R = 0
for i in A:
    if i<400 : B[0] = 1
    elif i<800 : B[1] = 1
    elif i<1200 : B[2] = 1
    elif i<1600 : B[3] = 1
    elif i<2000 : B[4] = 1
    elif i<2400 : B[5] = 1
    elif i<2800 : B[6] = 1
    elif i<3200 : B[7] = 1
    else : R += 1
print(B.count(1),min(B.count(1)+R,8))
