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

namespace Algorithm
{
    class Program
    {
        enum Color
        {
            Gray,Brown,Green,LightBlue,Blue,Yellow,Orange,Red,All
        }
        const int ColorCount = 9;
        static void Main(string[] args)
        {
            var N =int.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var cluster = new int[ColorCount];

            for (var i = 0; i < N; i++)
            {
                Classification(a[i], cluster);
            }
            var otherAll = cluster.Count(z => z > 0);

            if (cluster[(int)Color.All] == 0)
                Console.WriteLine($"{otherAll} {otherAll}");
            else
            {
                if (otherAll > 1) otherAll--;
                Console.WriteLine($"{otherAll} {Math.Min(ColorCount, otherAll + cluster[(int)Color.All])}");
            }
        }

        static void Classification(int x, int[] cls)
        {
            if (x <= 399) cls[(int)Color.Gray]++;
            else if (x <= 799) cls[(int)Color.Brown]++;
            else if (x <= 1199) cls[(int)Color.Green]++;
            else if (x <= 1599) cls[(int)Color.LightBlue]++;
            else if (x <= 1999) cls[(int)Color.Blue]++;
            else if (x <= 2399) cls[(int)Color.Yellow]++;
            else if (x <= 2799) cls[(int)Color.Orange]++;
            else if (x <= 3199) cls[(int)Color.Red]++;
            else cls[(int)Color.All]++;
        }
    }
}
