import std.stdio;
import std.conv;
import std.string;
import std.algorithm;
import std.array;
import std.format;
 
//string lines = q"[4
//2100 2500 2700 2700]";
 
void main()
{
  string buf, lines;
  while (!stdin.eof) {
    buf = stdin.readln();
    lines += buf;
  }
  string[] array  = splitLines(lines);
  int[]    intarr = array[1].split(" ").map!(e => to!int(e)).array;
  auto result     = reduce!(min, max)(intarr);
  int MIN         = result[0];
  int MAX         = result[1];
  int MIN_M       = result[0]/400;
  int MAX_M       = result[1]/400;
 
  int countMin  = 0;
  int overEight = intarr.count!(e => to!ulong(e) >= 8*400).to!int;
 
  foreach(int mod; MIN_M .. MAX_M) {
    if (mod >= 8) {
      break;
    } else if (mod == MIN_M || mod == MAX_M) {
      countMin += 1;
    } else {
      if (intarr.find!(e => e >= mod*400 && e < (mod+1)*400))
	countMin += 1;
    }
  }
 
  writeln(format("%s %s", countMin, countMin+overEight));
}