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

public class Program{
    public static void Main(){
        var watch = new Stopwatch();
        watch.Start();
        var isTest = false;
        var stream = new StreamWriter(Console.OpenStandardOutput()){AutoFlush = false};
        Console.SetOut(stream);
        TextReader reader;
        string filename="";
        
        if(filename.Length!=0){
            reader = new StreamReader(filename);
        }else{
            reader = Console.In;
        }

        var n = int.Parse(reader.ReadLine());
        var a = reader.ReadLine().Split().Select(int.Parse).ToArray();
        var cnt = 0;
        var abure = 0;
        bool[] bls = new bool[8];
        foreach (var x in a){
            if(cnt>=8) break;
            if(x<=399){
                if(bls[0]==false)bls[0]=true;
            }else if(x<=799){
                if(bls[1]==false)bls[1]=true;
            }else if(x<=1199){
                if(bls[2]==false)bls[2]=true;
            }else if(x<=1599){
                if(bls[3]==false)bls[3]=true;
            }else if(x<=1999){
                if(bls[4]==false)bls[4]=true;
            }else if(x<=2399){
                if(bls[5]==false)bls[5]=true;
            }else if(x<=2799){
                if(bls[6]==false)bls[6]=true;
            }else if(x<=3199){
                if(bls[7]==false)bls[7]=true;
            }else abure++;
            cnt = bls.Count(b=>b==true);
        }
        //愚直に取ったぶんがcntで最小値
        //3200以上のものはcntと足して最大値が8
        Console.WriteLine($"{cnt} {Math.Min(8, cnt+abure)}");
        watch.Stop();
        if(isTest){
            Console.WriteLine($"実行時間{watch.ElapsedMilliseconds}ミリ秒");
        }
        Console.Out.Flush();
    }
}
