n = gets.chomp.to_i
rates = gets.chomp.split.map(&:to_i)
colors = Array.new(9) { Array.new }
rates.each do |rate|
    x = rate / 400
    case x
        when 0
            colors[0] << rate
        when 1
            colors[1] << rate
        when 2
            colors[2] << rate
        when 3
            colors[3] << rate
        when 4
            colors[4] << rate
        when 5
            colors[5] << rate
        when 6
            colors[6] << rate
        when 7
            colors[7] << rate
        when 8
            colors[8] << rate
        else
            colors[9] << rate
    end
end
answer = []
count = 0
8.times do |i|
    next if colors[i].empty?
    count += 1
end
if colors[8].empty?
    answer << count << count
else
    answer << count << count + colors[8].size
end
puts answer.join(" ")
