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

namespace AtCoder.C
{
    public class Program
    {
        public static void Main() { var r = GetResult(); Debug.WriteLine(r); Console.Write(r); }

        private static object GetResult()
        {
            var N = ReadLong();
            var a = ReadLongs();

            var count = 0L;
            if (a.Any(x => 1 <= x && x <= 399)) count++;
            if (a.Any(x => 400 <= x && x <= 799)) count++;
            if (a.Any(x => 800 <= x && x <= 1199)) count++;
            if (a.Any(x => 1200 <= x && x <= 1599)) count++;
            if (a.Any(x => 1600 <= x && x <= 1999)) count++;
            if (a.Any(x => 2000 <= x && x <= 2399)) count++;
            if (a.Any(x => 2400 <= x && x <= 2799)) count++;
            if (a.Any(x => 2800 <= x && x <= 3199)) count++;

            var xCount = a.Count(x => x >= 3200);
            /*
            レート 1-399：灰色
            レート 400-799：茶色
            レート 800-1199：緑色
            レート 1200-1599：水色
            レート 1600-1999：青色
            レート 2000-2399：黄色
            レート 2400-2799：橙色
            レート 2800-3199：赤色
             */
            return $"{count} {count + xCount}";
        }

        #region Console.Read

        public static string ReadText() { return Console.ReadLine(); }
        public static List<string> ReadTexts() { return Console.ReadLine().Split(' ').ToList(); }
        public static long ReadLong() { return long.Parse(Console.ReadLine()); }
        public static (long, long) Read2Longs() { var ls = ReadLongs(); return (ls[0], ls[1]); }
        public static (long, long, long) Read3Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2]); }
        public static (long, long, long, long) Read4Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3]); }
        public static (long, long, long, long, long) Read5Longs() { var ls = ReadLongs(); return (ls[0], ls[1], ls[2], ls[3], ls[4]); }
        public static List<long> ReadLongs() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); }

        #endregion
    }
}
