using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;
using static System.Console;
using static System.Math;
using static System.Array;

class Program
{
    public static void Main()
    {
        var n = int.Parse(ReadLine());
        var a = ReadLine().Split().Select(x => int.Parse(x) / 400).ToArray();
        var color = new bool[8];
        var wild = 0;
        for(int i = 0; i < n; i++)
        {
            if(a[i] < 8)
                color[a[i]] = true;
            else
                wild++;
        }
        var min = color.Count(x => x == true);
        var max = (min + wild) % 8;

        WriteLine($"{min} {max}");
    }
}

