#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
string color(int r) {
  if (r >= 2800) return "red";
  if (r >= 2400) return "orange";
  if (r >= 2000) return "yellow";
  if (r >= 1600) return "blue";
  if (r >= 1200) return "cyan";
  if (r >= 800) return "green";
  if (r >= 400) return "brown";
  if (r >= 1) return "gray";
  return "";
}
int main() {
  int n, mn = 0, mx = 0;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (int)n; ++i) cin >> a[i];
  int lgm = 0;
  set<string> clrs;
  for (int i = 0; i < (int)((int)(a).size()); ++i) {
    if (a[i] < 3200)
      clrs.emplace(color(a[i]));
    else
      lgm += 1;
  }
  mn = ((int)(clrs).size());
  mx = mn + lgm;
  mn = mn || 1;
  printf("%d %d\n", mn, mx);
  return 0;
}
