N = gets.to_i
a = gets.chomp.split.map(&:to_i)
rate_optional_color = 0

rate = a.each_with_object(Hash.new(0)){|i, hash|
    case i
    when 1..399 then
        hash[:grey] += 1
    when 400..799 then
        hash[:brown] += 1
    when 800..1199 then
        hash[:green] += 1
    when 1200..1599 then
        hash[:light_blue] += 1
    when 1600..1999 then
        hash[:blue] += 1
    when 2000..2399 then
        hash[:yellow] += 1
    when 2400..2799 then
        hash[:orange] += 1
    when 2800..3199 then
        hash[:red] += 1
    else
        rate_optional_color += 1
    end
}

puts [rate.size, 1].max
puts [rate.size + rate_optional_color, 8].min