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

class Program
{    static void Main(string[] args)
    {
        // 入力
        var n = long.Parse(Console.ReadLine());
        long[] a = Console.ReadLine().Split().Select(long.Parse).ToArray();
        
        bool gray = false;
        bool brown = false;
        bool green = false;
        bool lbule = false;
        bool bule = false;
        bool yellow = false;
        bool orange = false;
        bool red = false;
        var max = 0;
        var min = 0;
        for (int i = 0; i < a.Length; i++)
        {
            if (a[i] < 400)
            {
                if (!gray)
                {
                    max++;
                    min++;
                }
                gray = true;
            }
            else if (a[i] < 800)
            {
                if (!brown)
                {
                    max++;
                    min++;
                }
                brown = true;
            }
            else if (a[i] < 1200)
            {
                if (!green)
                {
                    max++;
                    min++;
                }
                green = true;
            }
            else if (a[i] < 1600)
            {
                if (!lbule)
                {
                    max++;
                    min++;
                }
                lbule = true;
            }
            else if (a[i] < 2000)
            {
                if (!bule)
                {
                    max++;
                    min++;
                }
                bule = true;
            }
            else if (a[i] < 2400)
            {
                if (!yellow)
                {
                    max++;
                    min++;
                }
                yellow = true;
            }
            else if (a[i] < 2800)
            {
                if (!orange)
                {
                    max++;
                    min++;
                }
                orange = true;
            }
            else if (a[i] < 3200)
            {
                if (!red)
                {
                    max++;
                    min++;
                }
                red = true;
            }
            else
            {
                max++;
            }

        }
        Console.WriteLine(min + " " + max);
    }
}
