#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<string, int>;
const double PI = acos(-1);
string iro(int x) {
  string color;
  if (x >= 3200)
    color = "ziyu";
  else if (x >= 2800)
    color = "aka";
  else if (x >= 2400)
    color = "daidai";
  else if (x >= 2000)
    color = "ki";
  else if (x >= 1600)
    color = "ao";
  else if (x >= 1200)
    color = "mizu";
  else if (x >= 800)
    color = "midori";
  else if (x >= 400)
    color = "tya";
  else
    color = "hai";
  return color;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a.at(i);
  map<string, int> mp;
  for (int i = 0; i < (int)(n); i++) mp[iro(a.at(i))]++;
  int max, min;
  if (mp.count("ziyu")) {
    if (7 - mp.size() >= mp.at("ziyu"))
      max = mp.size() + mp.at("ziyu") - 1;
    else
      max = 8;
    if (mp.size() > 1)
      min = mp.size() - 1;
    else
      min = 1;
  } else {
    max = mp.size();
    min = mp.size();
  }
  cout << min << " " << max << endl;
}
