#include <bits/stdc++.h>
const int INF = 2147483647;
const int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
string color(int i) {
  if (i < 400)
    return "GRAY";
  else if (i < 800)
    return "BROWN";
  else if (i < 1200)
    return "GREEN";
  else if (i < 1600)
    return "CYAN";
  else if (i < 2000)
    return "BLUE";
  else if (i < 2400)
    return "YELLOW";
  else if (i < 2800)
    return "ORANGE";
  else if (i < 3200)
    return "RED";
  else
    return "FREE";
}
int main() {
  int n;
  cin >> n;
  map<string, int> a;
  for (int i = 0; i < (n); ++i) {
    int rate;
    cin >> rate;
    a[color(rate)]++;
  }
  if (a.find("FREE") == a.end()) {
    cout << a.size() << " " << a.size() << endl;
  } else {
    cout << a.size() - 1 << " " << a.size() - 1 + a["FREE"] << endl;
  }
  return 0;
}
