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

namespace ConsoleApp107 {
    class Program {
        static ulong mod = 1000000007;

        static void Main(string[] args) {
            int N = int.Parse(Console.ReadLine());

            var a = Console.ReadLine().Split().Select(int.Parse).ToArray();

            Array.Sort(a);

            int cnt_gray = 0;
            int cnt_brown = 0;
            int cnt_green = 0;
            int cnt_skyblue = 0;
            int cnt_blue = 0;
            int cnt_yellow = 0;
            int cnt_orange = 0;
            int cnt_red = 0;
            int cnt_other = 0;

            for (int i = 0; i < N; i++) {
                if (a[i] < 400) {
                    cnt_gray++;
                } else if (a[i] < 800) {
                    cnt_brown++;
                } else if (a[i] < 1200) {
                    cnt_green++;
                } else if (a[i] < 1600) {
                    cnt_skyblue++;
                } else if (a[i] < 2000) {
                    cnt_blue++;
                } else if (a[i] < 2400) {
                    cnt_yellow++;
                } else if (a[i] < 2800) {
                    cnt_orange++;
                } else if (a[i] < 3200) {
                    cnt_red++;
                } else {
                    cnt_other++;
                }
            }

            var color_list = new List<int> { cnt_gray, cnt_brown, cnt_green, cnt_skyblue, cnt_blue, cnt_yellow, cnt_orange, cnt_red };

            int color_num = color_list.Where(x => x != 0).Count();

            Console.WriteLine(color_num + " " + (color_num + cnt_other));
        }
    }
}
