#include <bits/stdc++.h>
using namespace std;
string color_hantei(int a) {
  if (a > 0 && a < 400)
    return "hai";
  else if (a >= 400 && a < 800)
    return "cha";
  else if (a >= 800 && a < 1200)
    return "midori";
  else if (a >= 1200 && a < 1600)
    return "mizu";
  else if (a >= 1600 && a < 2000)
    return "ao";
  else if (a >= 2000 && a < 2400)
    return "ki";
  else if (a >= 2400 && a < 2800)
    return "dai";
  else if (a >= 2800 && a < 3200)
    return "aka";
  else
    return "zzz";
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int ans = 0;
  int z_cnt = 0;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  map<string, int> rate;
  for (int i = 0; i < (int)(n); i++) {
    rate[color_hantei(a[i])]++;
  }
  for (auto c : rate) {
    if (c.first == "zzz") z_cnt += c.second;
    if (c.first != "zzz") ans++;
  }
  if (ans == 0)
    cout << 1 << " ";
  else
    cout << ans << " ";
  if (z_cnt + ans > 8)
    cout << 8 << endl;
  else
    cout << z_cnt + ans << endl;
}
