N = int(input())
a = list(map(int, input().split()))
colors = [False]*8
rainbow = 0
for i in range(N):
    if 1<=a[i]<=399:
        colors[0] = True
    elif 400<=a[i]<=799:
        colors[1] = True
    elif 800<=a[i]<=1199:
        colors[2] = True
    elif 1200<=a[i]<=1599:
        colors[3] = True
    elif 1600<=a[i]<=1999:
        colors[4] = True
    elif 2000<=a[i]<=2399:
        colors[5] = True
    elif 2400<=a[i]<=2799:
        colors[6] = True
    elif 2800<=a[i]<=3199:
        colors[7] = True
    else:
        rainbow += 1
if rainbow == 0:
    ans = colors.count(True)
    print(ans,ans)
else:
    tmp = colors.count(True)
    if tmp==0:# all rainbow
        min_ = 1
        if rainbow > 8:
            max_ = 8
        else:
            max_ = rainbow
        print(min_,max_)
    else:# rainbow exist
        min_ = colors.count(True)
        max_ = colors.count(True) + rainbow
        if max_ > 8:
            max_ = 8
        print(min_,max_)