<?php
$n = trim(fgets(STDIN));
$a = explode(" ",trim(fgets(STDIN)));

$r = array(0,0,0,0,0,0,0,0,0);
foreach($a as $val){
    $i = floor($val / 400);
    if($i > 8){
        ++$r[8];
    }else{
        ++$r[$i];
    }
}

$m = 0;
$i = 0;
while($i < 8){
    if($r[$i] > 0){
        ++$m;
    }
    ++$i;
}

$M = $r[8];
echo max(1,$m) ." ". min($m + $M,8);
?>