//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()

		print( non0?non0:1, non0+freecolor )


}
