n = input()
a = [int(num) for num in input().split()]
colors = [0 for i in range(8)]
borders = [1,400,800,1200,1600,2000,2400,2800,3200]
alpha = 0
for i in a:
    for j in range(1,n):
        if borders[j-1]<=i<borders[j]:
            colors[j-1] = 1
            break
    if i>3200:
        alpha +=1
col_min = colors.count(1)
col_max = colors.count(1) + alpha
if col_max>8:
    col_max = 8
print(str(col_min)+' '+str(col_max))
