n = int(input())
a = list(map(int,input().split()))
count = [0]*8
free = 0
for i in range(n):
    if a[i] <= 3199:
        count[a[i]//400] += 1
    else:
        free += 1
print(7 - count.count(0) + 1, 7 - count.count(0) + free + 1)