#include <iostream>
#include <vector>
#include <map>

using namespace std;

int N;

int main(){
  cin >> N;
  map<char,int> m;
  
  for(int i = 0; i < N; i++){
    int tmp;
    cin >> tmp;
    
    if(tmp >= 1 && tmp < 400)m['g']++;
    else if(tmp >= 400 && tmp < 800)m['n']++;
    else if(tmp >= 800 && tmp < 1200)m['e']++;
    else if(tmp >= 1200 && tmp < 1600)m['a']++;
    else if(tmp >= 1600 && tmp < 2000)m['b']++;
    else if(tmp >= 2000 && tmp < 2400)m['y']++;
    else if(tmp >= 2400 && tmp < 2800)m['o']++;
    else if(tmp >= 2800 && tmp < 3200)m['r']++;
    else if(tmp >= 3200)m['f']++;
  }
  
  int fixed = 0;
  int free = 0;
  
  for(auto iter = m.begin(), iter != m.end(), i++){   
    if(iter->first != 'f' && iter->second != 0) fixed++;
    else if(iter->first == 'f') free = iter->second;
  }
  int minc, maxc;
  minc = fixed + min(1,free);
  maxc = fixed + min((8-fixed), free);
  cout << minc << " " << maxc;
}
