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);
              
  }             
}
 import java.util.*; util.* java 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);
              
  }             
} 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);
              
  } main {   
     
   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);
              
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a[] = new int[8]; a new int[8] 8 int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int maxcnt = 0; 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 i = 0; int i = 0; i 0 i < N i N i++ i++ 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 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 b = sc.nextInt(); b sc.nextInt() sc.nextInt sc 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++;
       } b < 400 b 400 {
           a[0] = 1;
       } a[0] = 1 a[0] a 0 1 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++;
       } b < 800 b 800 {
           a[1] = 1;
       } a[1] = 1 a[1] a 1 1 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++;
       } b < 1200 b 1200 {
           a[2] = 1;
       } a[2] = 1 a[2] a 2 1 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++;
       } b < 1600 b 1600 {
           a[3] = 1;
       } a[3] = 1 a[3] a 3 1 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++;
       } b < 2000 b 2000 {
           a[4] = 1;
       } a[4] = 1 a[4] a 4 1 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++;
       } b < 2400 b 2400 {
           a[5] = 1;
       } a[5] = 1 a[5] a 5 1 if(b < 2800){
           a[6] = 1;
       }else if(b < 3200){
           a[7] = 1;
       }else if(b <= 4800){
           maxcnt++;
       } b < 2800 b 2800 {
           a[6] = 1;
       } a[6] = 1 a[6] a 6 1 if(b < 3200){
           a[7] = 1;
       }else if(b <= 4800){
           maxcnt++;
       } b < 3200 b 3200 {
           a[7] = 1;
       } a[7] = 1 a[7] a 7 1 if(b <= 4800){
           maxcnt++;
       } b <= 4800 b 4800 {
           maxcnt++;
       } maxcnt++ maxcnt int sum = 0; sum 0 for(int i = 0;i <= 7;i++){
       if(a[i] == 1){
           sum++;
       }       
   } int i = 0; int i = 0; i 0 i <= 7 i 7 i++ i++ i {
       if(a[i] == 1){
           sum++;
       }       
   } {
       if(a[i] == 1){
           sum++;
       }       
   } if(a[i] == 1){
           sum++;
       } a[i] == 1 a[i] a i 1 {
           sum++;
       } sum++ sum if(sum == 0){
       System.out.println(1 + " " + maxcnt);
       return;
   } sum == 0 sum 0 {
       System.out.println(1 + " " + maxcnt);
       return;
   } System.out.println(1 + " " + maxcnt) System.out.println System.out System System.out 1 + " " + maxcnt 1 + " " + maxcnt 1 " " maxcnt return; int min = 0; min 0 int max = 0; max 0 min = sum min sum max = sum + maxcnt max sum + maxcnt sum maxcnt System.out.println(min + " " + max) System.out.println System.out System System.out min + " " + max min + " " + max min " " max String[] args args 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);
              
  }             
} 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);
              
  }             
} Main
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);
              
  }             
}

