gets.to_i

max = 0

smaller = []

agets.split.map{|x|
    color = x.to_i / 400
    if color >= 8 then
        max += 1
    else
        smaller.push(color)
    end
    color
}

min = smaller.sort.uniq.length
max += min

printf("%d %d\n", min, max % 9)