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

namespace Contest
{
	class Program
	{
		static void Main()
		{
            int N = int.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split().Select(int.Parse);
            int[] rating = { 3200, 2800, 2400, 2000, 1600, 1200, 800, 400, 1 };
            int[] contestants = new int[rating.Length];
            foreach (var item in a)
            {
                for (int i = 0; i < rating.Length; i++)
                {
                    if (item >= rating[i])
                    {
                        contestants[i]++;
                        break;
                    }
                }
            }
            int count = contestants.Count(item => item > 0);
            else if (contestants[0] > 0)
            {
                if (count == 1)
                {
                    Console.WriteLine($"1 {contestants[0]}");
                }
                else
                {
                    Console.WriteLine($"{count - 1} {count + contestants[0] - 1}");
                }
            }
            else
            {
                Console.WriteLine($"{count} {count}");
            }
#if DEBUG
			Console.ReadKey();
#endif
		}
	}
}