#ABC064
n = int(input())
a = list(int(i) for i in input().split())
color = []
for i in range(n):
    for j in range(8):
        if a[i]>=400*j and a[i]<400*(j+1):
            color.append(j)
            break
        elif a[i]>=3200:
            color.append(8)
            break

color_map = {}
for c in color:
    if not c in color_map.keys():
        color_map[c] = 1
    else:
        color_map[c] += 1

cmin = 0
cmax = 0
for k,v in color_map.items():
    if not k==8:
        cmin += 1
    else:
        cmax += v
cmax = cmin+cmax if cmax+cmin<8 else 8
print(cmin,cmax)