function plus(main,arr,loop){
  console.log(arr)
  var persent = arr[0][0];
  var maxper = 0;
  var max = 0
  for(var i=0;arr[i][0]==persent;i++){
    arr[i]= arr[i].map(Number)
    console.log(arr[i])
    if(main[0]-0+arr[i][2]/main[1]-0+arr[i][1]>maxper)
    maxper = (main[0]-0+arr[i][2])/(main[1]-0+arr[i][1])//このへんまで書いた
    max = i;
    main = [main[0]-0+arr[i][2],main[1]-0+arr[i][1],maxper]
  }
  arr.splice(max,1);
  loop--;
  if(loop>0){
  plus(main,arr,loop);
  }else{
  return main;
  }
}
function arrsum(arr){
  var sum = 0;
  for(var i=0;i<arr.length;i++){
    sum+=arr[i];
  }
  return sum;
}
function gettop(arr){
  var persent = arr[0][0];
  var max =[0,0,0];
  for(var i=0;arr[i][0]==persent;i++){
    if(max[1]-0<arr[i][1]-0){
      max[2] = i;
      max[1] = arr[i][1];
      max[0] = arr[i][2];
    }
  }
  return max;
}
function Main(input) {
  input = input.trim()
  input = input.split("\n");
  var arr = input[1].split(" ").map(Number);
  var max = 0;
  var flag = 0;
  var col = [0,0,0,0,0,0,0,0];
  for(var i=0;i<input[0];i++){
    if(arr[i]<3200){
      col[Math.floor(arr[i]/400)] = 1;
      flag=1;
    }else{
      max++;
    }
  }
    var low = arrsum(col);
    max+=low;
    console.log(low+" "+max);
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));