_ = gets.to_i
arr = gets.chomp.split(' ').map(&:to_i)
map = Hash.new(0)
arr.each do |i|
  if i <= 399
    map['gray'] = 1
  elsif i <= 799
    map['brown'] = 1
  elsif i <= 1199
    map['green'] = 1
  elsif i <= 1599
    map['sky'] = 1
  elsif i <= 1999
    map['blue'] = 1
  elsif i <= 2399
    map['yellow'] = 1
  elsif i <= 2799
    map['orange'] = 1
  elsif i <= 3199
    map['red'] = 1
  else
    map['none'] = 1
  end
end
puts "#{map.count - map['none']} #{map.count >= 8 ? 8 : map.count + map['none']}"