import bisect
N = int(input())
a = sorted(list(map(int, input().split())))
color = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
border = []
for i in color:
    border.append(bisect.bisect_left(a, i))
border = [0] + border
num = []
for i in range(len(color)):
    num.append(border[i+1] - border[i])
num.append(N - sum(num))
colornum = sum(x>0 for x in num[:-1])
if colornum == 0:
    colornum = 1
    num[-1] -= 1
print(str(colornum) + " " + str(min(colornum + num[-1], 8)))