using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
    static void Main(string[] args)
    {
        HashSet<string> shurui = new HashSet<string> { };
        long n = long.Parse(Console.ReadLine());
        long[] a = Read.longs();
        long FREEs = 0;
        long[] s = new long[n];
        for (long i = 0; i < n; i++)
        {
            if (a[i] < 400) { s[i] = 1; }
            else if (a[i] < 800) { s[i] = 2; }
            else if (a[i] < 1200) { s[i] = 3; }
            else if (a[i] < 1600) { s[i] = 4; }
            else if (a[i] < 2000) { s[i] = 5; }
            else if (a[i] < 2400) { s[i] = 6; }
            else if (a[i] < 2800) { s[i] = 7; }
            else if (a[i] < 3200) { s[i] = 8; }
            else
            {
                FREEs++;
            }
            if (a[i] < 3200) { shurui.Add(s[i].ToString()); }
        }
        long saisho = shurui.Count();
        long saidai = Math.Min((shurui.Count() + FREEs), 8);
        Console.WriteLine(saisho+" "+saidai);Console.ReadLine();
    }


    public static Boolean uso() { return false; }
    public static long gcd(long a, long b)
    {
        while (true)
        {
            if (a == 0) { return b; }
            if (b == 0) { return a; }
            if (a > b) { a -= b; }
            else { b -= a; }
        }
    }
    public static long lcm(long a, long b)
    {
        return a * b / gcd(a, b);
    }
    public static bool IsPrime(long n)
    {
        if (n < 2) return false;
        if (n == 2) return true;

        for (long i = 2; i < n; i++)
        {
            if (n % i == 0) return false;
        }
        return true;
    }

}
public static class Read
{
    public static void outl(string n = "") { Console.WriteLine(n); return; }
    public static long Long()
    {
        return long.Parse(Console.ReadLine());
    }
    public static long[] longs()
    {
        return Console.ReadLine().Split().Select(long.Parse).ToArray();
    }
    public static string Str() { return Console.ReadLine(); }
    public static string[] Strs() { return Console.ReadLine().Split(); }
}