log = console.log;

var stdin = require("fs").readFileSync("/dev/stdin", "UTF-8");
var lines = stdin
  .split("\n")
  .filter(v => v !== "")
  .map(v => v.split(" ").map(Number));

var N = lines[0];
a = lines[1];

colors = Array(8).fill(0);
supers = 0;

a.forEach(rate => {
  if (rate <= 399) colors[0] = 1;
  else if (rate <= 799) colors[1] = 1;
  else if (rate <= 1199) colors[2] = 1;
  else if (rate <= 1599) colors[3] = 1;
  else if (rate <= 1999) colors[4] = 1;
  else if (rate <= 2399) colors[5] = 1;
  else if (rate <= 2799) colors[6] = 1;
  else if (rate <= 3199) colors[7] = 1;
  else if (rate >= 3200) supers += 1;
});

const colorcount = colors.reduce((a, b) => a + b);

if (supers === 0) {
  console.log(colorcount, colorcount);
} else if (supers >= 1 && colorcount === 0) {
  console.log(1, supers);
} else {
  console.log(colorcount, colorcount + supers);
}
