#13:27
N = int(input())
A = list(map(int,input().split()))
ex_red = [0]*8
red_cnt = 0

for i in range(8):#0-7
    for j in range(N):
        if 400*i<=A[j] and A[j]<400*(i+1):
            ex_red[i]+=1

for i in range(N):
    if 3200 <= A[i]:
        red_cnt += 1
not_red_color = 0
for i in range(8):
    if ex_red[i] > 0:
        not_red_color += 1
    
zero_num = 8 - not_red_color

if red_cnt<=1:
    ans = red_cnt + not_red_color
else:#red_cnt more than 2
    assign = red_cnt - 1
    if zero_num >= assign:
        ans = assign + not_red_color + 1
    else:
        ans = zero_num + not_red_colot + 1

#if red_cnt != 0:
min_ans = not_red_color

# if zero_num >= red_cnt:
#     ans = red_cnt + not_red_color
# else:
#     ans = zero_num + not_red_color

print(min_ans, ans)
