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

baclet = [False] * 9
baclet[8] = 0

for val in a:
    if val < 400:
        baclet[0] = True
    elif val >= 400 and val < 800: 
        baclet[1] = True
    elif val >= 800 and val < 1200: 
        baclet[2] = True
    elif val >= 1200 and val < 1600: 
        baclet[3] = True
    elif val >= 1600 and val < 2000: 
        baclet[4] = True
    elif val >= 2000 and val < 2400: 
        baclet[5] = True
    elif val >= 2400 and val < 2800: 
        baclet[6] = True
    elif val >= 2800 and val < 3200: 
        baclet[7] = True
    elif val >= 3200: 
        baclet[8] += 1

if 8 - baclet[:-1].count(True) >= baclet[8]:
    print(baclet[:-1].count(True) , baclet[:-1].count(True) + baclet[8])
else:
    print(baclet[:-1].count(True) , 8)
