using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Contests
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var inputs = Console.ReadLine().Split(' ').Select((x) => int.Parse(x));
            var colors = new int[8];
            int over = 0;
            int variant = 0;
            foreach (var x in inputs)
            {
                var ix = x / 400;
                if (ix > 7) over++;
                else
                {
                    if (colors[ix] == 0) variant++;
                    colors[ix]++;
                }
            }
            Console.WriteLine("{0} {1}", Math.Max(over > 0 ? 1: 0, variant), Math.Min(8, variant + over));
        }
    }
}
