n = int(input())
li = list(map(int,input().split()))
ans = [0]*8
x = 0

for i in li:
    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:
        x += 1

x += 8-ans.count(0)
if x > 8:
    x = 8
print(8-ans.count(0), x)