N = int(input())
a_list = list(map(int, input().split()))
color_dic = {"gray":False, "brown":False, "green":False, "thin_blue":False, "blue":False, "yellow":False, "orange":False, "red":False, "legend":0}
for i in a_list:
    if 1<=i and i<=399:
       color_dic["gray"] = True
    elif 400<=i and i<=799:
        color_dic["brown"] = True
    elif 800<=i and i<=1199:
        color_dic["green"] = True
    elif 1200<=i and i<=1599:
        color_dic["thin_blue"] = True
    elif 1600<=i and i<=1999:
        color_dic["blue"] = True
    elif 2000<=i and i<=2399:
        color_dic["yellow"] = True
    elif 2400<=i and i<=2799:
        color_dic["orange"] = True
    elif 2800<=i and i<=3199:
        color_dic["red"] = True
    else:
        color_dic["legend"] += 1
ans = 0
print(color_dic)
for k, v in color_dic.items():
    if k!="legend":
        if v==True:
            ans += 1
    else:
        ans_min = ans
        ans += v
print(ans_min, ans)