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

namespace AtCoderBeginnerContest
{
    public class Program
    {
        public static long[] iro;
        public static long over;

        public static void Main(string[] args)
        {
            // 064-C
            var N = long.Parse(Console.ReadLine());

            var line = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList();

            iro = new long[] { 0, 0, 0, 0, 0, 0, 0, 0 };
            over = 0;

            foreach (var item in line)
            {
                Rate(item);
            }

            long max = 0;
            long min = 0;

            foreach (var item in iro)
            {
                if (item != 0) min++;
            }
            max = min + over;
            if (max > 8) max = 8;

            Console.WriteLine(@"{min} {max}");

        }

        public static void Rate(long n)
        {
            if(1 <= n && n<= 399)
            {
                iro[0]++;
            }
            else if (400 <= n && n <= 799)
            {
                iro[1]++;

            }
            else if (800 <= n && n <= 1199)
            {
                iro[2]++;

            }
            else if (1200 <= n && n <= 1599)
            {
                iro[3]++;

            }
            else if (1600 <= n && n <= 1999)
            {
                iro[4]++;

            }
            else if (2000 <= n && n <= 2399)
            {
                iro[5]++;

            }
            else if (2400 <= n && n <= 2799)
            {
                iro[6]++;

            }
            else if (2800 <= n && n <= 3199)
            {
                iro[7]++;

            }
            else if (3200 <= n && n <= 4800)
            {
                over++;
            }
        }
    }
}
