#include <bits/stdc++.h>
int n;
int a;
int under_red, over_red;
std::map<std::string, int> mp;
std::string color(int a) {
  std::string res;
  if (a < 400)
    res = "Gray";
  else if (a < 800)
    res = "Brown";
  else if (a < 1200)
    res = "Green";
  else if (a < 1600)
    res = "Light Blue";
  else if (a < 2000)
    res = "Blue";
  else if (a < 2400)
    res = "Yellow";
  else if (a < 2800)
    res = "Orange";
  else if (a < 3200)
    res = "Red";
  else
    res = "Great";
  return res;
}
int main() {
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    int a;
    std::string c;
    std::cin >> a;
    c = color(a);
    if (mp.find(c) == mp.end()) {
      mp[c] = 1;
    } else {
      ++mp[c];
    }
  }
  int min = (mp.find("Great") != mp.end()) ? mp.size() - 1 : mp.size();
  int max =
      (mp.find("Great") == mp.end()) ? min : std::min(8, min + mp["Great"]);
  std::cout << min << ' ' << max << std::endl;
  return 0;
}
