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

c = [0, 0, 0, 0, 0, 0, 0, 0, 0]

for rate in a:
    if (rate >= 1) and (400 > rate):
        c[0] += 1
    elif (rate >= 400) and (800 > rate):
        c[1] += 1
    elif (rate >= 800) and (1200 > rate):
        c[2] += 1
    elif (rate >= 1200) and (1600 > rate):
        c[3] += 1
    elif (rate >= 1600) and (2000 > rate):
        c[4] += 1
    elif (rate >= 2000) and (2400 > rate):
        c[5] += 1
    elif (rate >= 2400) and (2800 > rate):
        c[6] += 1
    elif (rate >= 2800) and (3200 > rate):
        c[7] += 1
    else:
        c[8] += 1
        
color_rigid = len([i for i, e in enumerate(c[:8]) if e != 0])

print ("%d %d"%(max(1, color_rigid), min(color_rigid + c[8], 8)))