N = int(input())
a = [int(i) for i in input().split()]
rank = [0]*9
ans = [0]*2
for i in range(len(a)):
    if a[i] < 400:
        rank[0] = 1
    elif a[i] < 800:
        rank[1] = 1
    elif a[i] < 1200:
        rank[2] = 1
    elif a[i] < 1600:
        rank[3] = 1
    elif a[i] < 2000:
        rank[4] = 1
    elif a[i] < 2400:
        rank[5] = 1
    elif a[i] < 2800:
        rank[6] = 1
    elif a[i] < 3200:
        rank[7] = 1
    else:
        rank[8] += 1
ans[0] = sum(rank)
if 8 < ans[0]:
    ans[0] = 8
if rank[9] != 0 and (sum(rank[0:8])) == 0:
    ans[1] = 1
else:
    ans[1] = sum(rank[0:8])

[print(ans[i], end=' ') for i in reversed(range(len(ans)))]
