using System;
using System.Linq;
using System.Collections.Generic;

class P
{
    static void Main()
    {
        /*
         */
        Console.ReadLine();
        int[] rates = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();

        bool[] rateColor = new bool[8];
        int over3200 = 0;
        foreach (var rate in rates)
        {
            if (rate >= 3200)
            {
                over3200++;
            }
            else
            {
                rateColor[rate / 400] = true;
            }
        }
        int colorVal = rateColor.Count(x => x);
        Console.WriteLine(Math.Max(colorVal, 1) + " " + Math.Min(colorVal + over3200, 8));
    }
}