ratesLetter=input().split()
del ratesLetter[0]
rates=[]
colors=[]
over=[]
for rate in ratesLetter:
    rates.append(int(rate))
for rate in rates:
    if rate<=399:
        colors.append('gray')
    elif rate>=400 and rate<=799:
        colors.append('brown')
    elif rate>=800 and rate<=1199:
        colors.append('green')
    elif rate>=1200 and rate<=1599:
        colors.append('lightblue')
    elif rate>=1600 and rate<=1999:
        colors.append('blue')
    elif rate>=2000 and rate<=2399:
        colors.append('yellow')
    elif rate>=2400 and rate<=2799:
        colors.append('orange')
    elif rate>=2800 and rate<=3199:
        colors.append('')
    elif rate>=3200:
        over.append('a')
length=len(set(colors))
print(length, length+len(over))