unittest
{
	assert( [ "4", "2100 2500 2700 2700" ].parse.expand.solve == "2 2" );
	assert( [ "5", "1100 1900 2800 3200 3200" ].parse.expand.solve == "3 5" );
	assert( [ "20", "800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990" ].parse.expand.solve == "1 1" );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.strip.to!( long );
	input.popFront;
	auto as = input.front.split.to!( long[] );
	return tuple( as );
}

auto solve( long[] as )
{
	auto gs = as.sort.map!( ( a ) => ( a < 3200 ) ? a / 400 : 10 ).group.array;
	if( gs[ $ - 1 ][ 0 ] < 10 ) return format( "%d %d", gs.length, gs.length );
	else                        return format( "%d %d", gs.length - 1, gs.length -1 + gs[ $ - 1 ][ 1 ] );
}
