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