gets
colors_map = gets.split.map { |a| [a.to_i / 400, 8].min }.each_with_object(Array.new(9, 0)) do |rank, arr|
  if rank == 8
    arr[rank] += 1
  else
    arr[rank] = 1
  end
end
p colors_map

max = colors_map.sum
min = [colors_map[0..7].sum, 1].max
puts "#{min} #{max}"
