from strutils import split,parseInt
from sequtils import map

let N=readLine(stdin).parseInt
let a=readLine(stdin).split(' ').map(parseInt)

var count:array[9,int]
for r in a:
    if r<399:
        inc(count[0])
    elif r<800:
        inc(count[1])
    elif r<1200:
        inc(count[2])
    elif r<1600:
        inc(count[3])
    elif r<2000:
        inc(count[4])
    elif r<2400:
        inc(count[5])
    elif r<2800:
        inc(count[6])
    elif r<3200:
        inc(count[7])
    else:
        inc(count[8])

var kind=0
for i in countup(0,7):
    if count[i]>0:
        inc(kind)
echo(kind," ",kind+count[8])