n = gets.to_i
rates = gets.split.map(&:to_i)
colors = []
joker = 0

rates.each do |r|
  if 1 <= r && r <= 399
    colors << 'grey'
  elsif 400 <= r && r <= 799
    colors << 'brown'
  elsif 800 <= r && r <= 1199
    colors << 'green'
  elsif 1200 <= r && r <= 1599
    colors << 'light blue'
  elsif 1600 <= r && r <= 1999
    colors << 'blue'
  elsif 2000 <= r && r <= 2399
    colors << 'yellow'
  elsif 2400 <= r && r <= 2799
    colors << 'orange'
  elsif 2800 <= r && r <= 3199
    colors << 'red'
  elsif 3200 <= r
    joker += 1
  end
end
color_size = colors.uniq.size
maximum = color_size + joker
if maximum > 8
  maximum = 8
end

puts "#{color_size} #{maximum}"
