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

free = 0
color = [0]*9
for i in range(N):
    if a[i]>3200:
        color[8] += 1
    color[a[i]//400] += 1
mini = 0
for i in color[0:8]:
    if i != 0:
        mini += 1
print(str(mini)+' '+str(min(mini+color[8],9)))
