n = int(input())
a = list(map(int,input().split()))
l = []
red = 0
for i in a:
    if i<400:
        if not "hai" in l:
            l.append("hai")
    elif i<800:
        if not "tya" in l:
            l.append("tya")
    elif i<1200:
        if not "midori" in l:
            l.append("midori")
    elif i<1600:
        if not "mizu" in l:
            l.append("mizu")
    elif i<2000:
        if not "ao" in l:
            l.append("ao")
    elif i<2400:
        if not "ki" in l:
            l.append("ki")
    elif i<2800:
        if not "dai" in l:
            l.append("dai")
    elif i<3200:
        if not "aka" in l:
            l.append("aka")
    else:
        red+=1
        if not "aka" in l:
            l.append("aka")
x = len(l)
print(x,x+red)