using System;
using System.Linq;
 
public class Test
{
	public static void Main()
	{
		Console.ReadLine();
        var r = Console.ReadLine().Split().Select(v=>int.Parse(v)/400);
Console.WriteLine(r.Where(v=>v<8).GroupBy(v=>v).Count() + " " + (r.Where(v=>v<8).GroupBy(v=>v).Count() + r.Count(v=>v>=8)));
	}
}
