package main

import "fmt"

func main() {
	var N int
	fmt.Scan(&N)
	var section [9]int
	a := make([]int, N)
	for i := 0; i < N; i++ {
		fmt.Scan(&a[i])
	}
	for _, v := range a {
		switch {
		case 1 <= v && v < 400:
			section[0]++
		case 400 <= v && v < 800:
			section[1]++
		case 800 <= v && v < 1200:
			section[2]++
		case 1200 <= v && v < 1600:
			section[3]++
		case 1600 <= v && v < 2000:
			section[4]++
		case 2000 <= v && v < 2400:
			section[5]++
		case 2400 <= v && v < 2800:
			section[6]++
		case 2800 <= v && v < 3200:
			section[7]++
		case 3200 <= v:
			section[8]++
		}
	}
	var colors int
	for i := 0; i < len(section)-1; i++ {
		if section[i] > 0 {
			colors++
		}
	}
	fmt.Println(colors, colors+section[8])
}
