package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	other := 0
	flags := make([]bool, 8)
	for i := 0; i < n; i++ {
		var t int
		fmt.Scan(&t)
		if t >= 3200 {
			other++
		} else {
			flags[t/400] = true
		}
	}
	min := 0
	for i := 0; i < 8; i++ {
		if flags[i] {
			min++
		}
	}

	if min == 0 {
		if other < 8 {
			fmt.Println(1, other)
		} else {
			fmt.Println(1, 8)
		}
	} else if min < 8 {
		if min+other < 8 {
			fmt.Println(min, min+other)
		} else {
			fmt.Println(min, 8)
		}
	} else {
		fmt.Println(8, 8)
	}
}
