a = [0] * 8
A.each{|n|
  a[n / 400] = 1 if n < 3200
}
sum = a.inject(0, :+)
top = A.count{|n| n >= 3200 }
# min = [sum, top].max
min = [sum, 1].max
# max = [sum + top, 8].min
max = sum + top
puts "#{min} #{max}"
