# 個数の標準入力
my $input1 = <STDIN>;
chomp $input1;

# 色番号の標準入力
my $input2 = <STDIN>;
chomp $input2;
my @strcolor = split(/ /, $input2);

my $color1;
my $color2;
my $color3;
my $color4;
my $color5;
my $color6;
my $color7;
my $color8;
my $allcolor;

my $i = 0;
while ($i < $input1) {

    if (@strcolor[$i] => 1) && (@strcolor[$i] <= 399) {
        $color1 = 1;
    }
    if (@strcolor[$i] => 400) && (@strcolor[$i] <= 799) {
        $color2 = 1;
    }
    if (@strcolor[$i] => 800) && (@strcolor[$i] <= 1199) {
        $color3 = 1;
    }
    if (@strcolor[$i] => 1200) && (@strcolor[$i] <= 1599) {
        $color4 = 1;
    }
    if (@strcolor[$i] => 1600) && (@strcolor[$i] <= 1999) {
        $color5 = 1;
    }
    if (@strcolor[$i] => 2000) && (@strcolor[$i] <= 2399) {
        $color6 = 1;
    }
    if (@strcolor[$i] => 2400) && (@strcolor[$i] <= 2799) {
        $color7 = 1;
    }
    if (@strcolor[$i] => 2800) && (@strcolor[$i] <= 3199) {
        $color8 = 1;
    }
    if (@strcolor[$i] => 3200) && (@strcolor[$i] <= 4800) {
        $allcolor++;
    }
    
    $i++;
}

my $mincnt = $color1 + $color2 + $color3 + $color4 + $color5 + $color6 + $color7 + $color8;
my $maxcnt = $mincnt + $allcolor;

print join($mincnt," ",$maxcnt);
print "\n";
