#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  int n, a, free = 0;
  cin >> n;
  unordered_map<string, int> um;
  for (int i = 0; i < (n); i++) {
    cin >> a;
    if (1 <= a && a <= 399) {
      um["gray"]++;
    } else if (400 <= a && a <= 799) {
      um["brown"]++;
    } else if (800 <= a && a <= 1199) {
      um["green"]++;
    } else if (1200 <= a && a <= 1599) {
      um["sky"]++;
    } else if (1600 <= a && a <= 1999) {
      um["blue"]++;
    } else if (2000 <= a && a <= 2399) {
      um["yellow"]++;
    } else if (2400 <= a && a <= 2799) {
      um["orange"]++;
    } else if (2800 <= a && a <= 3199) {
      um["red"]++;
    } else {
      free++;
    }
  }
  int minc = um.size();
  int maxc = minc + free;
  cout << minc << " " << maxc << endl;
  return 0;
}
