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

class Mondai
{
    static void Main()
    {
        var N = Int32.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        var array = new int[9];
        var rate = new int[] { 400,800,1200,1600,2000,2400,2800,3200,4801};
        for (int i = 0; i < 9; ++i) array[i] = 0;
        for (int i=0;i<N;++i)
        {
            for (int j=0;j<rate.Length;++j){
                if (a[i] < rate[j]) {
                    if (j != rate.Length - 1)
                    {
                        if (array[j] == 0) array[j]++; 
                        break;
                    }
                    else array[j]++;
                }
            }
        }
        var min = array.Take(rate.Length - 1).Sum();
        var max = min + array[rate.Length - 1];
        if (rate.Length - 1 < max) max = rate.Length - 1;
        Console.WriteLine($"{min} {max}");
    }
}