n = int(input())
a = input().split()
list = []
list_of_topcoder = []

for i in range(n):
    if 1<=int(a[i])<=399:
        if "gray" not in list:
            list.append("gray")
        else:
            pass
    elif 400<=int(a[i])<=799:
        if "brown" not in list:
            list.append("brown")
        else:
            pass
    elif 800<=int(a[i])<=1199:
        if "green" not in list:
            list.append("green")
        else:
            pass
    elif 1200<=int(a[i])<=1599:
        if "water" not in list:
                list.append("water")
        else:
            pass
    elif 1600<=int(a[i])<=1999:
        if "blue" not in list:
            list.append("blue")
        else:
            pass
    elif 2000<=int(a[i])<=2399:
        if "brown" not in list:
            list.append("yellow")
        else:
            pass
    elif 2400<=int(a[i])<=2799:
        if "orange" not in list:
            list.append("orange")
        else:
            pass
    elif 2800<=int(a[i])<=3199:
        if "red" not in list:
            list.append("red")
        else:
            pass
    elif 3200<=int(a[i])<=4800:
        list_of_topcoder.append(i)

if len(list) != 0:
    print(len(list), len(list)+len(list_of_topcoder))
else:
    print(1, len(list_of_topcoder))
