h = gets.to_i
as = gets.split.map(&:to_i)
cs = as.group_by { |a| a / 400 }
ans = 0
free = 0
for i in 0..12
  unless cs[i].nil?
    if i < 8
      ans += 1
    else
      free += cs[i].size
    end
  end
end
ans_min = [ans, 1].max
ans_max = [8, ans+free].min
puts "#{ans_min} #{ans_max}"