<?php
fscanf(STDIN, "%d", $n);
$a = explode(' ', trim(fgets(STDIN)));
$q = [];
$r = 0;
foreach ($a as $b) {
	$i = min(floor($b / 400), 8);
	if ($i <= 7) {
		$q[$i] = 1;
	} else {
		$r++;
	}
}
$x = $y = count($q);
if ($r) {
	$y = min($x + $r, 8);
	$x = max(1, $x);
}
echo "$x $y";