A = int(input())
colors = [0] * 8
l_n = list(map(int,input().split()))
if [i for i in l_n if 1 <= i <= 399] != []:
        colors[0] = 1
for j in range(1,8):
    if [i for i in l_n if 0+(j*400) <= i <= 399+(j*400)] != []:
        colors[j] = 1
ans_m = colors.count(1)
all_colors = len([i for i in l_n if 3200 <= i])
print(ans_m,ans_m+all_colors)