my $n = get;
my @a = get.split(' ');
my %colors;
my $free_num;
for @a -> $rate {
    if $rate >= 3200 {
        $free_num++;
        next;
    }
    my $rank = ($rate+0) div 400;
    %colors.push: ($rank => 1);
}
my $b_color_num = %colors.keys.elems;
my $ans_min = $b_color_num;
my $ans_max = $b_color_num+$free_num;
say "$ans_min $ans_max";
