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

namespace ConsoleApp11
{
    class Class46
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var check = Enumerable.Repeat(false, 8).ToArray();
            int count = 0;
            for(int i = 0; i < N; i++)
            {
                if (a[i] / 400 < 8)
                {
                    check[a[i] / 400] = true;
                }
                else
                    count++;
            }
            int min = check.Count(x => x == true);
            int max = min + count;
            Console.WriteLine($"{min} {max}");
           
        }
    }
}
