N = gets.to_i
a_list = gets.split.map(&:to_i)
table = Hash.new { 0 }
a_list.each do |a|
  b = [a / 400, 8].min
  table[b] += 1
end
min = [
  [table[8], 8].min,
  (0..7).count { |k| table.key?(k) }
].max
max = [
  table[8] + (0..7).count { |k| table.key?(k) },
  8
].min
puts "#{min} #{max}"
