N = int(input())
a = [int(i) for i in input().split()]
ans = [0]*8
count = 0
for i in a:
    if i < 400:
        ans[0] += 1
    elif i < 800:
        ans[1] += 1
    elif i < 1200:
        ans[2] += 1
    elif i < 1600:
        ans[3] += 1
    elif i < 2000:
        ans[4] += 1
    elif i < 2400:
        ans[5] += 1
    elif i < 2800:
        ans[6] += 1
    elif i < 3200:
        ans[7] += 1
    else:
        count += 1
count1 = 0
for i in ans:
    if i!=0:
        count1 += 1
mn = count1
mx = count1 + count
print(mn,mx)