n = int(input())
a_li = list(map(int,input().split()))
a_li.sort()
ans_min = [0]*8
ans_max = [0]*8
dum = 0
for i in a_li:
    if 0 < i < 400:
        ans_max[0] = 1
        ans_min[0] = 1
    elif 400 <= i < 800:
        ans_max[1] = 1
        ans_min[1] = 1
    elif 800 <= i < 1200:
        ans_max[2] = 1
        ans_min[2] = 1
    elif 1200 <= i < 1600:
        ans_max[3] = 1
        ans_min[3] = 1
    elif 1600 <= i < 2000:
        ans_max[4] = 1
        ans_min[4] = 1
    elif 2000 <= i < 2400:
        ans_max[5] = 1
        ans_min[5] = 1
    elif 2400 <= i < 2800:
        ans_max[6] = 1
        ans_min[6] = 1
    elif 2800 <= i < 3200:
        ans_max[7] = 1
        ans_min[7] = 1
    else:
        dum += 1
ans_max_sum = sum(ans_max) + dum
ans_min_sum = sum(ans_min)
if ans_max_sum > 8:
    ans_max_sum = 8
print(ans_min_sum,ans_max_sum)