N = gets.strip.to_i
a = gets.strip.split.map(&:to_i)

color_parted_a_without_parted_legends = a.map {|x| (x/400).to_i }.sort
legends, without_legends = color_parted_a_without_parted_legends.partition {|x| x>7 }
color_parted_a = without_legends

count_hash = color_parted_a.group_by {|x| x }

color_counted_array = count_hash.map{|x| x.last.length }

legend_count = legends.length

#p color_counted_array

min = color_counted_array.length
max = [color_counted_array.length + legend_count, 8].min

puts [min, max].join(' ')
