using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Console;
using static System.Math;

namespace AtCodeeeer
{
    class AtCOOOOOOOOOOOder
    {
        static void Main(string[] args)
        {
            int n = int.Parse(ReadLine());
            var dic = new Dictionary<int, int>();
            int[] s = ReadLine().Split(' ').Select(int.Parse).ToArray();
            for (int i = 0; i < 8; i++)
            {
                dic.Add(i, 0);
                dic[i] += s.Count(x =>
                                    400 * i <= x && x < 400 * (i + 1));
                if (i > 1 && dic[i] - dic[i - 1] > 0) dic[i] -= dic[i - 1];
            }
            WriteLine(
                dic.Count(x => x.Value >= 1) + " " + (dic.Count(x => x.Value >= 1) + s.Count(x => x>=3200))
                );
        }
    }
}