COLORS = [
  1..399,
  400..799,
  800..1199,
  1200..1599,
  1600..1999,
  2000..2399,
  2400..2799,
  2800..3199
]

n = gets.to_i
a = gets.split.map(&:to_i)

cs = []
anycolor = 0
a.each do |r|
  if r < 3200
    COLORS.each_with_index do |c, i|
      cs << i if c.include? r
      cs.uniq!
    end
  else
    anycolor += 1
  end
end

min = [cs.size, 1].max
max = [COLORS.size, cs.size + anycolor].min
puts "#{min} #{max}"
