//Main(require("fs").readFileSync("/dev/stdin", "utf8"));

function Main(input) {

	Array.zeros = (n) => { return Array.apply(null, Array(n)).map( ()=>0 ) }
	Array.prototype.max = function() { return Math.max.apply(null, this) }
	Array.prototype.min = function() { return Math.min.apply(null, this) }
	Array.prototype.non0length = function() { return this.reduce( (pre, current) => pre + (current != 0) ) }
	var num = (val) => Array.isArray(val) ? val.map( (v)=>Number(v) ) : Number(val)
	var print = console.log

	var line = input.split("\n")
	var n = num( line[0] )
	var a = num( line[1].split(" ") )

	var colors = 8
	var counter = Array.zeros(colors)
	var freecolor = 0

	for (var late of a) {
		if(late < 3200) {
			counter[~~(late/400)]++
		} else {
			freecolor++
		}
	}

	var non0 = counter.non0length()


	if(non0 == 0) non0 = 1

	if(freecolor == 0)
		print( non0, non0 )
	else if( non0 + freecolor > colors )
		print( non0, colors )
	else
		print( non0, non0+freecolor )




}

Main(`4
2100 2500 2700 2700`)

Main(`5
1100 1900 2800 3200 3200`)

Main(`20
800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990`)

Main(`0
5000 5000 5000 5000 5000 5000 5000 5000 5000 5000`)
