import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    a = f()

    b = [0] * 9
    for i in range(n):
        if a[i]<=399:
            b[0] += 1
        elif a[i]<=799:
            b[1] += 1
        elif a[i]<=1199:
            b[2] += 1
        elif a[i]<=1599:
            b[3] += 1
        elif a[i]<=1999:
            b[4] += 1
        elif a[i]<=2399:
            b[5] += 1
        elif a[i]<=2799:
            b[6] += 1
        elif a[i]<=3199:
            b[7] += 1
        else:
            b[8] += 1
    
    cnt = 0
    for i in range(8):
        if b[i] >0:
            cnt+=1

    minc = cnt if cnt>0 else 1

    maxc = cnt + min(8-cnt, b[8])
    print(minc, maxc)

solve()
