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