N = int(input())
A = list(map(int, input().split()))
A = map( lambda x:x//400, A)
A = list(map( lambda x:x if x<8 else 8, A))
cnt8 = A.count(8)
A = list(sorted(set(A)))
if 8 in A:
    A.remove(8)
sum = len(A)
print(sum, end=' ')
sum += cnt8
if sum > 8:
    print(8)
else:
    print(sum)