using System;
using System.Collections.Generic;
using System.Globalization;

namespace cswork
{
    class Program
    {
        public Program() { }

        Scanner cin;
        const int MAXIN = 1024;
        bool[] used = new bool[MAXIN];
        int[] perm = new int[MAXIN];

        List<int[]> permList = new List<int[]>();

        void Omame()
        {
            cin = new Scanner();
            int n = cin.nextInt();

            bool[] colors = new bool[8];
            int rainbow = 0;
            for (int i = 0; i < n; i++)
            {
                int a = cin.nextInt();

                if (a < 400)
                {
                    colors[0] = true;
                }
                else if (a < 800)
                {
                    colors[1] = true;
                }
                else if (a < 1200)
                {
                    colors[2] = true;
                }
                else if (a < 1600)
                {
                    colors[3] = true;
                }
                else if (a < 2000)
                {
                    colors[4] = true;
                }
                else if (a < 2400)
                {
                    colors[5] = true;
                }
                else if (a < 2800)
                {
                    colors[6] = true;
                }
                else if (a < 3200)
                {
                    colors[7] = true;
                }
                else
                {
                    rainbow++;
                }
            }

            int count = 0;
            for (int i = 0; i < colors.Length; i++)
            {
                if (colors[i])
                {
                    count++;
                }
            }

            int min = count;
            // int max = Math.Min(8, count + rainbow);
            int max = count + rainbow;

            if(count == 0)
            {
                min = 1;
            }
            Console.WriteLine(min + " " + max);
        }

        static void Main(string[] args)
        {
            new Program().Omame();
        }

        public void Permutation(int pos, int n, int length)
        {
            if (pos == n)
            {
                permList.Add((int[])perm.Clone());
            }

            for (int i = 0; i < n; i++)
            {
                if (!used[i])
                {
                    perm[pos] = i;
                    used[i] = true;
                    Permutation(pos + 1, n, length);
                    used[i] = false;
                }
            }
        }
    }

    class Scanner
    {
        string[] s;
        int i;

        char[] cs = new char[] { ' ' };

        public Scanner()
        {
            s = new string[0];
            i = 0;
        }

        public string next()
        {
            if (i < s.Length) return s[i++];
            string st = Console.ReadLine();
            while (st == "") st = Console.ReadLine();

            s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            i = 0;
            return next();
        }

        public int nextInt()
        {
            return int.Parse(next());
        }

        public long nextLong()
        {
            return long.Parse(next());
        }

        public double nextDouble()
        {
            return double.Parse(next());
        }
    }
}

Measured memory_bytes: 11220