#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int ratings[n];
  std::string tmp[n];
  int addmax = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &ratings[i]);
  }
  for (int i = 0; i < n; i++) {
    if (ratings[i] > 0 && ratings[i] < 400) tmp[i] = "grey";
    if (ratings[i] >= 400 && ratings[i] < 800) tmp[i] = "brown";
    if (ratings[i] >= 800 && ratings[i] < 1200) tmp[i] = "green";
    if (ratings[i] >= 1200 && ratings[i] < 1600) tmp[i] = "cyan";
    if (ratings[i] >= 1600 && ratings[i] < 2000) tmp[i] = "blue";
    if (ratings[i] >= 2000 && ratings[i] < 2400) tmp[i] = "yellow";
    if (ratings[i] >= 2400 && ratings[i] < 2800) tmp[i] = "orange";
    if (ratings[i] >= 2800 && ratings[i] < 3200) tmp[i] = "red";
    if (ratings[i] >= 3200) {
      addmax++;
      tmp[i] = "red";
    }
  }
  std::unordered_set<std::string> s(tmp, tmp + n);
  printf("%d %d", s.size(), s.size() + addmax);
  return 0;
}
