using System.Linq;
using System;
class Program
{
    static void Main()
    {
        var N = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x));
        bool[] colors = new bool[8];
        int others = 0;
        foreach (var rate in a)
        {
            if (rate >= 3200)
            {
                others++;
            }
            else
            {
                colors[rate / 400] = true;
            }
        }
        var min = colors.Count(x => x);
        var max = min + others;
        Console.WriteLine($"{min} {max}");
    }
}