for i in range(n):
    if a[i] < 400:
        mapa[1] += 1
    elif a[i] < 800:
        mapa[2] += 1
    elif a[i] < 1200:
        mapa[3] += 1
    elif a[i] < 1600:
        mapa[4] += 1
    elif a[i] < 2000:
        mapa[5] += 1
    elif a[i] < 2400:
        mapa[6] += 1
    elif a[i] < 2800:
        mapa[7] += 1
    elif a[i] < 3200:
        mapa[8] += 1
    else:
        el += 1
count = 0
for i in mapa:
    if mapa[i] > 0:
        count += 1
if count > 0:
    print(str(count) + ' ' + str(count + el))
else:
    print('1 ' + str(el))