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

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] score = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            List<string> color_list = new List<string>();
            string color = null;
            int black = 0;

            foreach (int i in score)
            {
                if (i < 400) color = "gray";
                else if (i < 800) color = "brown";
                else if (i < 1200) color = "green";
                else if (i < 1600) color = "lightblue";
                else if (i < 2000) color = "blue";
                else if (i < 2400) color = "yellow";
                else if (i < 2800) color = "orange";
                else if (i < 3200) color = "red";
                else black++;

                if (!color_list.Contains(color) && !string.IsNullOrEmpty(color))
                {
                    color_list.Add(color);
                }
            }

            int min = color_list.Count;
            int max = black;

            if(min == 0)
            {
                min = 1;
            }
            else
            {
                max = (min + black < 8) ? min + black : 8;
            }

            Console.WriteLine(min + " " + max);
        }
    }
}
