object Main extends App {
	val N = scala.io.StdIn.readInt
	val x = scala.io.StdIn.readLine

	val a: Array[Int] = new Array(N)
	val b: Array[Int] = new Array(9)

	for(i <- 0 until N){
		a(i) = x.split(" ")(i).toInt
	}

	def find(x: Int):Int = {
		if(1<=x && x<=399){
			return 0;
		}else if(400<=x && x<=799){
			return 1;
		}else if(800<=x && x<=1199){
			return 2;
		}else if(1200<=x && x<=1599){
			return 3;
		}else if(1600<=x && x<=1999){
			return 4;
		}else if(2000<=x && x<=2399){
			return 5;
		}else if(2400<=x && x<=2799){
			return 6;
		}else if(2800<=x && x<=3199){
			return 7;
		}else{
			return 8;
		}
	}

	for(i<- 0 until N){
		val t = find(a(i))

		b(t) = b(t) + 1;
	}

	var count = 0

	for(i<- 0 to 7){
		if(b(i) != 0) count = count + 1
	}

	if(b(8) == 0){
		println(count + " " + count)
	}else if(count == 0){
		val u = count + b(8)
		if(u <= 8){
			println("1 "+ u)
		}else{
			println("1 8")
		}
	}else if(count == 0 && b(8) == 0){
		println("0 0")
	}else{
		val u = count + b(8)
		if(u <= 8){
			println(count + " "+ u)
		}else{
			println(count + " 8")
		}
	}
	
}