N = int(input())

a = list(map(int, input().split()))

lst = [0] * 9

for i in range(N):
    lst[min(a[i]//400, 8)] += 1

count = lst[:8].count(0)

kind_max = min(8-count+lst[8])
kind_min = max(8-count,1)

print (kind_min, kind_max)