N = int(input())

a = list(map(int,input().split()))

x = [0]*9

for i in a:
    if 1<= i <=399:
        x[0]+=1
    elif 400 <= i <= 799:
        x[1]+=1
    elif 800 <= i <= 1199:
        x[2]+=1
    elif 1200 <= i <= 1599:
        x[3]+=1
    elif 1600 <= i <= 1999:
        x[4]+=1
    elif 2000 <= i <= 2399:
        x[5]+=1
    elif 2400 <= i <= 2799:
        x[6]+=1
    elif 2800 <= i <= 3199:
        x[7]+=1
    else:
        x[8]+=1

res = 0
for i in range(len(x)-1):
    if x[i] > 0 :
        res+=1

if res >= 8:
    print("8 ",end="")
else:
    print("{} ".format(res),end="")

if res+x[8] >= 8:
    print("8")
elif res == 0:
    print(1)
else:
    print(res+x[8])

#print(x)