import sys

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

c = [0 for i in range(8)]
o = 0
max_color = 0
min_color = 0

for i in range(N):
    if(A[i]>=3200):
        o += 1
        continue
    c[int(A[i]/400)] = 1

if (sum(c)+o > 8):
    max_color = 8
else:
    max_color = sum(c) + o

if(o > sum(c)):
    if (o - sum(c) > 8):
        min_color = 8
    else:
        min_color = o - sum(c)
else:
    min_color = sum(c)

print (min_color, max_color)