#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int INF = 1000000000;
const int dx[4] = {0, 0, 1, -1};
const int dy[4] = {1, -1, 0, 0};
const int N = 100001;
int a[N];
string s[10] = {"gray", "brown",  "green",  "cyan",
                "blue", "yellow", "orange", "red"};
set<string> ans;
bool used[N];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; (i) < (n); ++i) cin >> a[i];
  int mn;
  int c = 0;
  for (int i = 0; (i) < (n); ++i) {
    if (a[i] >= 1 && a[i] <= 399) ans.insert(s[0]);
    if (a[i] >= 400 && a[i] <= 799) ans.insert(s[1]);
    if (a[i] >= 800 && a[i] <= 1199) ans.insert(s[2]);
    if (a[i] >= 1200 && a[i] <= 1599) ans.insert(s[3]);
    if (a[i] >= 1600 && a[i] <= 1999) ans.insert(s[4]);
    if (a[i] >= 2000 && a[i] <= 2399) ans.insert(s[5]);
    if (a[i] >= 2400 && a[i] <= 2799) ans.insert(s[6]);
    if (a[i] >= 2800 && a[i] <= 3199) ans.insert(s[7]);
    if (a[i] >= 3200) c++;
  }
  mn = ans.size();
  cout << mn << " " << min(mn + c, 9) << endl;
  return 0;
}
