using System;
using System.Linq;
public class s
{
  public static void Main()
  {
    int n=int.Parse(Console.ReadLine());
    int[] rating=Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
    int min =0;
    int max=0;
    int[] color=new int[9];
    int nohuman=0;
    for(int i=0;i<n;i++)
    {
      if(rating[i]<=399)color[0]++;
      else if(rating[i]<=799)color[1]++;
      else if(rating[i]<=1199)color[2]++;
      else if(rating[i]<=1599)color[3]++;
      else if(rating[i]<=1999)color[4]++;
      else if(rating[i]<=2399)color[5]++;
      else if(rating[i]<=2799)color[6]++;
      else if(rating[i]<=3199)color[7]++;
      else color[8]++;
    }
    for(int i=0;i<8;i++)
    {
      if(color[i]>=0)min++;
      else nohuman++;
    }
    if(color[8]==0||nohuman==0)max=min;
    else if(nohuman<=color[8])max=min+nohuman;
    else if(nohuman>color[8])max=min+color[8];
      Console.WriteLine("{0} {1}",min,max);
  }
}
