N= int(input())
a_li = list(map(int,input().split()))
colors = {"gray":0,"brown":0,"green":0,"lightblue":0,"blue":0,"yellow":0,"orange":0,"red":0,"free":0}
for i in a_li:
    if 1 <= i <= 399:
        colors["gray"] += 1
    elif 400 <= i <= 799:
        colors["brown"] += 1
    elif 800 <= i <= 1199:
        colors["green"] += 1
    elif 1200 <= i <= 1599:
        colors["lightblue"] += 1
    elif 1600 <= i <= 1999:
        colors["blue"] += 1
    elif 2000 <= i <= 2399:
        colors["yellow"] += 1
    elif 2400 <= i <= 2799:
        colors["orange"] += 1
    elif 2800 <= i <= 3199:
        colors["red"] += 1
    else:
        colors["free"] += 1
ans_max = 0
ans_min = 0
for key,num in list(colors.items())[:-1]:
    if num >= 1:
        ans_min += 1
free = colors["free"]
ans_max = ans_min + free
print(ans_min,ans_max)

