input()
p =[int(x) for x in input().split(" ")]

r1_399 = 0
r400_799 = 0
r800_1199 = 0
r1200_1599 = 0
r1600_1999 = 0
r2000_2399 = 0
r2400_2799 = 0
r2800_3199 = 0
over3200 = 0

for i in p:
    if 1 <= i <400:
        r1_399 +=1
    elif 400 <= i <800:
        r400_799 +=1
    elif 800 <= i <1200:
        r800_1199 +=1
    elif 1200 <= i <1600:
        r1200_1599 +=1
    elif 1600 <= i <2000:
        r1600_1999 +=1
    elif 2000 <= i <2400:
        r2000_2399 += 1
    elif 2400 <= i < 2800:
        r2400_2799 += 1
    elif 2800<= i <3199:
        r2800_3199 += 1
    elif 3200<= i:
        over3200 += 1
num = 0
for i in [r1_399,r400_799,r800_1199,r1200_1599,r1600_1999,r2000_2399,r2400_2799,r2800_3199]:
    if i > 0:
        num+=1

nummax = num + over3200
if nummax>8:
    nummax = 8
print(str(num)+" " +str(nummax))