#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for(int i=0;i<N;i++){
    cin >> a.at(i);
  }
  int a,b,c,d,e,f,g,h,i;
  a=0; b=0; c=0; d=0; e=0; f=0; g=0; h=0; i=0;
  for(int i=0;i<N;i++){
    if(a.at(i)<=399){a++;}
    if(400<=a.at(i) && a.at(i)<=799){b++}
    if(800<=a.at(i) && a.at(i)<=1199){c++}
    if(1200<=a.at(i) && a.at(i)<=1599){d++}
    if(1600<=a.at(i) && a.at(i)<=1999){e++}
    if(2000<=a.at(i) && a.at(i)<=2399){f++}
    if(2400<=a.at(i) && a.at(i)<=2799){g++}
    if(2800<=a.at(i) && a.at(i)<=3199){h++}
    if(3200<=a.at(i)){i++}
  }
  int A=0;
  if(a!=0){A++;}
  if(b!=0){A++;}
  if(c!=0){A++;}
  if(d!=0){A++;}
  if(e!=0){A++;}
  if(f!=0){A++;}
  if(g!=0){A++;}
  if(h!=0){A++;}
  cout << A << " ";
  if(i+A<=8){cout << i+A << endl;}
  else{cout << 8 << endl;}
}