#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#define llong long long
#define pb(a) push_back(a)
#define strVecSORT(strVec) sort(strVec.begin(), strVec.end());
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;

int main(){
  int N;
  cin>>N;
  int i;
  vector<int> gray,brown,green,lightBlue,Blue,yellow,orange,red,rainbow;
  rep(i,N){
    int a;
    cin>>a;
    if(a<=399) {gray.pb(a);
    }else if(a<=799) {brown.pb(a);
    }else if(a<=1199) {green.pb(a);
    }else if(a<=1599) {lightBlue.pb(a);
    }else if(a<=1999) {Blue.pb(a);
    }else if(a<=2399) {yellow.pb(a);
    }else if(a<=2799) {orange.pb(a);
    }else if(a<=3199) {red.pb(a);
    }else if(a<=4800) {rainbow.pb(a);
    }
}
  int grayA,brownA,greenA,lightBlueA,BlueA,yellowA,orangeA,redA,rainbowA;
  if(gray.size()==0){
    grayA=0;
  }else{
    grayA=1;
  }
  if(brown.size()==0){
    brownA=0;
  }else{
    brownA=1;
  }
  if(green.size()==0){
    greenA=0;
  }else{
    greenA=1;
  }
  if(lightBlue.size()==0){
    lightBlueA=0;
  }else{
    lightBlueA=1;
  }
  if(Blue.size()==0){
    BlueA=0;
  }else{
    BlueA=1;
  }
  if(yellow.size()==0){
    yellowA=0;
  }else{
    yellowA=1;
  }
  if(orange.size()==0){
    orangeA=0;
  }else{
    orangeA=1;
  }
  if(red.size()==0){
    redA=0;
  }else{
    redA=1;
  }
  if(rainbow.size()==0){
      rainbowA=0;
  }else{
      rainbowA=rainbow.size();
  }
  int ansMin=grayA+brownA+greenA+lightBlueA+BlueA+yellowA+orangeA+redA;
  int ansMax=grayA+brownA+greenA+lightBlueA+BlueA+yellowA+orangeA+redA+rainbowA;
  if(ansMin==0){
    ansMin=1;
  }
  if(8<=ansMax){
    ansMax=8;
  }
  cout<<ansMin;
  cout<<" ";
  cout<<ansMax<<endl;
}
