import java.util.*;

public class Main {                        
  public static void main(String[] args) {   
     
   Scanner sc = new Scanner(System.in);                                                                                     
    
   int a[] = new int[8];
   
   int N = sc.nextInt();
   
   int maxcnt = 0;
   
   for(int i = 0;i < N;i++){
       int b = sc.nextInt();
       if(b < 400){
           a[0] = 1;
       }else if(b < 800){
           a[1] = 1;
       }else if(b < 1200){
           a[2] = 1;
       }else if(b < 1600){
           a[3] = 1;
       }else if(b < 2000){
           a[4] = 1;
       }else if(b < 2400){
           a[5] = 1;
       }else if(b < 2800){
           a[6] = 1;
       }else if(b < 3200){
           a[7] = 1;
       }else if(b <= 4800){
           maxcnt++;
       }
   }
   
   int sum = 0;
   
   for(int i = 0;i <= 7;i++){
       if(a[i] == 1){
           sum++;
       }       
   }
   
   if(sum == 0){
       System.out.println(1 + " " + maxcnt);
       return;
   }   
    
   int min = 0;
   int max = 0;
   
   min = sum;
   max = sum + maxcnt;
       
   System.out.println(min + " " + max);
              
  }             
}

