#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  map<string, int> m;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    if (a <= 399)
      m["gray"]++;
    else if (a <= 799)
      m["brown"]++;
    else if (a <= 1199)
      m["green"]++;
    else if (a <= 1599)
      m["lightblue"]++;
    else if (a <= 1999)
      m["blue"]++;
    else if (a <= 2399)
      m["yellow"]++;
    else if (a <= 2799)
      m["orange"]++;
    else if (a <= 3199)
      m["red"]++;
    else
      m["others"]++;
  }
  const int NUM_RATES = 8;
  int cnt = 0;
  for (auto it = m.begin(); it != m.end(); it++) {
    pair<string, int> item = *it;
    if (item.first == "others") continue;
    if (item.second) cnt++;
  }
  int max_num_rates = min(cnt + m["others"], NUM_RATES);
  int min_num_rates = cnt;
  cout << min_num_rates << " " << max_num_rates << endl;
  return 0;
}
