"use strict";
function Main(input) {
  input = input.split("\n");
  const person = input[1].split(" ");
  const boxes = [];
  
  for(let i=0; i < 9; i++){
      boxes[i] = 0;
  }
    
  for(let personCount=0; personCount < person.length; personCount++){
      const inputValue = parseInt(person[personCount], 10);
      if(inputValue < 400){
          boxes[0] = true;
      }
      else if(inputValue < 800){
          boxes[1] = true;
      }
      else if(inputValue < 1200){
          boxes[2] = true;
	  }
	  else if(inputValue < 1600){
	      boxes[3] = true;
	  }
	  else if(inputValue < 2000){
	      boxes[4] = true;
	  }
	  else if(inputValue < 2400){
	      boxes[5] = true;
	  }
	  else if(inputValue < 2800){
	      boxes[6] = true;
	  }
	  else if(inputValue < 3200){
	      boxes[7] = true;
	  }
	  else if(inputValue <= 4800){
	      boxes[8] += 1;
	  }
  }
  
  let  color = 0;
  for(let colorCount=0; colorCount < 8; colorCount++){
      color += boxes[colorCount];
  }
  
  const max = color + boxes[8];
  let min = color;
  
  if(color === 0 && boxes[8] > 0){
      min = 1;
  }
  console.log(min,max);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));