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

rate = {}
for i in range(9):
    rate[i] = 0

for i in range(N):
    a = A[i]
    if 1<=a and a<=399:
        rate[0] += 1
        continue
    if 400<=a and a<=799:
        rate[1] += 1
        continue
    if 800<=a and a<=1199:
        rate[2] += 1
        continue
    if 1200<=a and a<=1599:
        rate[3] += 1
        continue
    if 1600<=a and a<=1999:
        rate[4] += 1
        continue
    if 2000<=a and a<=2399:
        rate[5] += 1
        continue
    if 2400<=a and a<=2799:
        rate[6] += 1
        continue
    if 2800<=a and a<=3199:
        rate[7] += 1
        continue
    if 3200<=a:
        rate[8] += 1
        continue

ans_min = 0
ans_max = 0
count_zero = 0
count_3200over = rate[8]

for i in range(8):
    if rate[i]>=1:
        ans_min = ans_min + 1
    else:
        count_zero = count_zero + 1
ans_max = ans_min

if count_zero==8:
    print(ans_min, ans_max)
    exit()

if count_zero<=count_3200over:
    print(ans_min, ans_max+count_zero)
else:
    print(ans_min, ans_max+count_3200over)
