Nc = input()
N = int(Nc)
cor = ''
c = map(int,input().split())
l = list(c)
l2 = []
l3 = []
maxL = 0

for num in l:
    if 1 <= N <= 100 and 1 <= num <= 4800 and type(num) == int:
        if  1 <= num <= 399:
            cor = 'cinzento'
            l2.append(cor)
        elif 400 <= num <= 799:
            cor = 'castanho'
            l2.append(cor)
        elif 800 <= num <= 1199:
            cor = 'verde'
            l2.append(cor)
        elif 1200 <= num <= 1599:
            cor = 'ciano'
            l2.append(cor)
        elif 1600 <= num <= 1999:
            cor = 'azul'
            l2.append(cor)
        elif 2000 <= num <= 2399:
            cor = 'amarelo'
            l2.append(cor)
        elif 2400 <= num <= 2799:
            cor = 'laranja'
            l2.append(cor)
        elif 2800 <= num <= 3199:
            cor = 'vermelho'
            l2.append(cor)
        else:
            cor = input()
            maxL = maxL+1
            
for color in l2:
    if color not in l3 :
        l3.append(color)
        maxL = maxL+ 1
print(len(l3), maxL)