n = gets.to_i
as = gets.split.map(&:to_i)
rs = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
cs = Array.new(9, 0)
as.each do |a|
  i = rs.bsearch_index { |r| r > a }
  cs[i] += 1
end
free = cs.pop
sum = cs.count { |c| c > 0 }
print sum == 0 ? 1 : sum
print " "
puts [sum + free, 8].min