n = int(input())
a =  list(map(int,input().split()))
hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
tyen = 0
aka = 0
tourist = 0
for i in a:
    if 1 <= i  <= 399:
        if hai > 0:
            pass
        else:
            hai+=1
    elif 400 <= i  <= 799:
        if tya > 0:
            pass
        else:
            tya+=1
    elif 800 <= i  <= 1199:
        if midori > 0:
            pass
        else:
            midori+=1
    elif 1200 <= i  <= 1599:
        if mizu > 0:
            pass
        else:
            mizu+=1
    elif 1600 <= i  <= 1999:
        if ao > 0:
            pass
        else:
            ao+=1
    elif 2000 <= i  <= 2399:
        if ki > 0:
            pass
        else:
            ki+=1
    elif 2400 <= i  <= 2799:
        if tyen > 0:
            pass
        else:
            tyen+=1
    elif 2800 <= i  <= 3199:
        if aka > 0:
            pass
        else:
            aka+=1
    else:
        tourist+=1
Sum = hai + tya + midori + mizu + ao + ki + tyen + aka
MIN = Sum
MAX = 0
if Sum < 8:
    if Sum + tourist >=  8:
        MAX = 8
    else:
        MAX = Sum + tourist
else:
    MAX = 8
print(MIN,MAX)
