<?php
error_reporting(0);
$stdin = file_get_contents('php://stdin');
$line = explode("\n",$stdin);
$fi = 0;
$cnt = 0;
$list = array();
$key = new stdclass();
foreach($line as $l) {
  if (strlen($l)==0) continue;
  if ($fi == 0) {
    $a = explode(" ",$l);
    $key->A = $a;
    $fi++;
    continue;
  }
  if ($fi > 0) {
    $a = explode(" ",$l);
    $key->X[] = $a;
  }
}
$N = $key->A[0];
$A = $key->X[0];
$ret = chkcolor($A);
printf("%d %d\n",$ret[0],$ret[1]);

function chkcolor($l) {
  $ary = array();
  $any=0;
  foreach($l as $score) {
    if ($score <= 399) {
      $ary[0]=1;
      continue;
    }
    if ($score <= 799) {
      $ary[1]=1;
      continue;
    }
    if ($score <= 1199) {
      $ary[2]=1;
      continue;
    }
    if ($score <= 1599) {
      $ary[3]=1;
      continue;
    }
    if ($score <= 1999) {
      $ary[4]=1;
      continue;
    }
    if ($score <= 2399) {
      $ary[5]=1;
      continue;
    }
    if ($score <= 2799) {
      $ary[6]=1;
      continue;
    }
    if ($score <= 3199) {
      $ary[7]=1;
      continue;
    }
    if ($score >= 3200) {
      $any+=1;
    }
  }
  $tot=0;
  $tot2=0;
  foreach($ary as $a) {
    $tot += 1;
  }
  if ($any>0 && $tot==0) {
    $tot=1;
  }
  $ret[]=$tot;
  $ret[]=$tot+$any;
  return $ret;
}
