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

namespace abc064_c
{
    class Program
    {
        static void Main(string[] args)
        {
            var N = GetInt();
            var a = GetIntList();
            var c = new bool[8];
            var c32 = 0;

            for (int i = 0;i<N;i++)
            {
                for(int j = 1; j <= 8; j++) 
                    if (a[i] < 400 * j)
                    {
                        c[j - 1] = true;
                        break;
                    }

                if (a[i] >= 3200) c32++;
            }

            var cc = c.Where(x => x).Count();

            if (c32 > cc) Console.WriteLine("1 " + c32);
            else Console.WriteLine(cc + " " + (c32 + cc));

            Console.ReadKey();

        }

        public static string GetStr() => Console.ReadLine();
        public static int GetInt() => int.Parse(Console.ReadLine());
        public static long GetLong() => long.Parse(Console.ReadLine());
        public static double GetDouble() => double.Parse(Console.ReadLine());
        public static decimal GetDecimal() => decimal.Parse(Console.ReadLine());

        public static List<string> GetStrList() => Console.ReadLine().Split(' ').ToList();
        public static List<int> GetIntList() => Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
        public static List<long> GetLongList() => Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList();
        public static List<double> GetDoubleList() => Console.ReadLine().Split(' ').Select(x => double.Parse(x)).ToList();
        public static List<decimal> GetDecimalList() => Console.ReadLine().Split(' ').Select(x => decimal.Parse(x)).ToList();

    }
}
