#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;

int main(){
  int n;
  scanf("%d",&n);
  int a[1000]={0};
  int cnt1=0;
  int cnt2=0;
  int cnt3=0;
  int cnt4=0;
  int cnt5=0;
  int cnt6=0;
  int cnt7=0;
  int cnt8=0;
  int cnt9=0;

  for(int i = 0;i < n;i++){
    scanf("%d",&a[i]);
    if(a[i]<400){
      cnt1=1;
    }else if(a[i]<800){
      cnt2=1;
    }else if(a[i]<1200){
      cnt3=1;
    }else if(a[i]<1600){
      cnt4=1;
    }else if(a[i]<2000){
      cnt5=1;
    }else if(a[i]<2400){
      cnt6=1;
    }else if(a[i]<2800){
      cnt7=1;
    }else if(a[i]<3200){
      cnt8=1;
    }else{
      cnt9++;
    }
  }
  int res1 = cnt1+cnt2+cnt3+cnt4+cnt5+cnt6+cnt7+cnt8;
  int resout;
  int res2=0;
  if(res1==8){
    res2=8;
  }else if(res1==7&&cnt9>0){
    res2=8;
  }else if(res1<7&&res1/=0&&cnt9>=8-res1){
    res2=8;
  }else{
    res2 = res1 + cnt9;
  }


  printf("%d %d",res1,res2);
  return 0;
}
