#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1};
int dx[] = {1, -1, 0, 0};
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int n, ans, cnt;
set<string> S;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < (n); i++) {
    int x;
    cin >> x;
    string t;
    if (1 <= x && x < 400)
      t = "ash";
    else if (400 <= x && x < 800)
      t = "brown";
    else if (800 <= x && x < 1200)
      t = "green";
    else if (1200 <= x && x < 1600)
      t = "water";
    else if (1600 <= x && x < 2000)
      t = "blue";
    else if (2000 <= x && x < 2400)
      t = "yellow";
    else if (2400 <= x && x < 2800)
      t = "orange";
    else if (2800 <= x && x < 3200)
      t = "red";
    else {
      cnt++;
      continue;
    }
    S.insert(t);
  }
  cout << S.size() << " " << S.size() + cnt << endl;
  ;
  return 0;
}
