import sys
input = sys.stdin.readline
N = int(input())
a = [int(i) for i in input().split()]
li = [False] * 8
count_over = 0
for i in range(N) :
    if 1 <= a[i] <= 399 :
        if li[0] == False :
            li[0] = True
    if 400 <= a[i] <= 799 :
        if li[1] == False :
            li[1] = True
    if 800 <= a[i] <= 1199 :
        if li[2] == False :
            li[2] = True
    if 1200 <= a[i] <= 1599 :
        if li[3] == False :
            li[3] = True
    if 1600 <= a[i] <= 1999 :
        if li[4] == False :
            li[4] = True
    if 2000 <= a[i] <= 2399 :
        if li[5] == False :
            li[5] = True
    if 2400 <= a[i] <= 2799 :
        if li[6] == False :
            li[6] = True
    if 2800 <= a[i] <= 3199 :
        if li[7] == False :
            li[7] = True
    if 3200 <= a[i] :
        count_over += 1
sum = 0
for i in range(8) :
    if li[i] :
        sum+=1
maxx = min(8,sum+count_over)
minn = 0
if sum == 0 :
    minn = 1
else :
    minn = sum
print(minn,maxx)