import java.util.*
 
fun main(args: Array<String>) {
	readLine()
	val input: String = readLine()!!
	val rates: List<Int> = input.split(" ").map {it.toInt()}
	
	val colors: IntArray = IntArray(8)
	var freeColors = 0
	for (rate: Int in rates) {
		if (rate >= 3200) {
			freeColors += 1
		} else {
			colors.set((rate / 400) as Int,  1)
		}
	}
	val fixedColors = colors.sum()
	print("$fixedColors ${fixedColors + freeColors}")
}