#include <iostream>                                                                                   
#include <vector>                                                                                     
using namespace std;                                                                                  
                                                                                                      
int main() {                                                                                          
  int n;                                                                                              
  cin >> n;                                                                                           
  vector<int> people(n);                                                                              
  for (int i=0; i<n; i++) {                                                                           
    cin >> people[i];                                                                                 
  }                                                                                                   
  vector<int> rateMember(9, 0);                                                                       
  for (int i=0; i<n; i++) {                                                                           
    int rate = min(people[i] / 400, 8);                                                               
    rateMember[rate] += 1;                                                                            
  }                                                                                                   
                                                                                                      
                                                                                                      
  int withoutRed = 0;                                                                                 
  for (int i=0; i<8; i++) {                                                                           
    //cout << rateMember[i] << endl;                                                                  
    if (rateMember[i]) {                                                                              
      withoutRed += 1;                                                                                
    }                                                                                                 
  }                                                                                                   
  int red = rateMember[8];                                                                            
  int maxr = withoutRed + red;                                                                
  int minr = max(1, withoutRed);                                                                      
                                                                                                      
  cout << minr << " " << maxr << endl;                                                                
                                                                                                      
  return 0;                                                                                           
}                                                                                                     
                                                                                                      
                            

Measured memory_bytes: 256