using System;
using System.Linq;
using System.Collections.Generic;
public class Hello
{

    public static void Main()
    {
        int N = int.Parse(Console.ReadLine());
        string[] s = Console.ReadLine().Split(' ');
        int[] num = Array.ConvertAll<string, int>(s, delegate (string s_) { return int.Parse(s_); });
        int[] color = new int[8];
        int pro_cont = 0;
        for (int i = 0; i < N; i++)
        {
            if (0 <= num[i] && num[i] < 400) color[0] = 1;
            else if (400 <= num[i] && num[i] < 800) color[1] = 1;
            else if (800 <= num[i] && num[i] < 1200) color[2] = 1;
            else if (1200 <= num[i] && num[i] < 1600) color[3] = 1;
            else if (1600 <= num[i] && num[i] < 2000) color[4] = 1;
            else if (2000 <= num[i] && num[i] < 2400) color[5] = 1;
            else if (2400 <= num[i] && num[i] < 2800) color[6] = 1;
            else if (2800 <= num[i] && num[i] < 3200) color[7] = 1;
            else pro_cont++;
        }
        int ans_min = color.Sum();
        if (pro_cont == 0) Console.WriteLine("{0} {1}",ans_min,ans_min);
        else {
            int ans_max = ans_min + pro_cont;
            if (ans_max > 8) ans_max = 8;
            Console.WriteLine("{0} {1}", ans_min, ans_max);
        }
        
    }
}