count = gets.chomp
locs = gets.chomp.split(' ').map{|m| m.to_i}
color_array = []
free_array = []
is_free = 0
locs.each do |loc|
  if loc / 400 >= 7
    is_free = 1
    free_array << loc / 400
  else
    color_array << loc / 400 
  end
end
puts "#{color_array.uniq.size+is_free} #{color_array.uniq.size + free_array.size}"
