n = gets.to_i
a = gets.split.map(&:to_i)
a.map!{|a| a / 400}.sort!
hash = {}
a.each do |a|
  if a >= 8
    if hash[8] == nil
      hash[8] = 1
    else hash[8] = hash[8] + 1
    end
  else 
    if hash[a] == nil then
      hash[a] = 1
    else
      hash[a] = hash[a] + 1
    end
  end
end

puts hash
if hash[8] == nil
  puts hash.size.to_s + ' ' + hash.size.to_s
else
  big = hash[8]
  hash.delete 8
  remain = 8 - hash.size
  if big > remain
    max = hash.size + remain
  else
    max = hash.size + big
  end
  puts hash.size.to_s + ' ' + max.to_s
end