N = STDIN.gets.to_i
a = STDIN.gets.split(" ").map(&:to_i).sort
counts = Array.new(8, 0)
max_count = 0
a.each do |rate|
  if rate < 3200
    case rate
      when 1..399 then counts[0] = 1
      when 400..799 then counts[1] = 1
      when 800..1199 then counts[2] = 1
      when 1200..1599 then counts[3] = 1
      when 1600..1999 then counts[4] = 1
      when 2000..2399 then counts[5] = 1
      when 2400..2799 then counts[6] = 1
      when 2800..3199 then counts[7] = 1
    end
  else
    max_count += 1
  end
end

sum = 0
counts.each { |count| sum += count }
counts.delete(0)
sum += max_count if 0 < max_count
puts "#{counts.count} #{sum}"