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

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();
            var an = new List<int>();
            an.AddRange(Console.ReadLine().Split().Select(s=>int.Parse(s)));
            var colors = new bool[8];
            var asta = 0;
            foreach(var a in an)
            {
                if (a < 400) colors[0] = true;
                else if (a < 800) colors[1] = true;
                else if (a < 1200) colors[2] = true;
                else if (a < 1600) colors[3] = true;
                else if (a < 2000) colors[4] = true;
                else if (a < 2400) colors[5] = true;
                else if (a < 2800) colors[6] = true;
                else if (a < 3200) colors[7] = true;
                else asta++;
            }
            var min = colors.Count(b => b);
            if (min == 0) min++;
            Console.WriteLine($"{min} {min + asta}");
        }
    }
}