#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  int n, a, gold = 0;
  cin >> n;
  unordered_map<string, int> mp;
  for (int i = 0; i < (n); i++) {
    cin >> a;
    if (1 <= a && a < 400)
      mp["gray"]++;
    else if (400 * 1 <= a && a < 400 * 2)
      mp["cha"]++;
    else if (400 * 2 <= a && a < 400 * 3)
      mp["green"]++;
    else if (400 * 3 <= a && a < 400 * 4)
      mp["waterblue"]++;
    else if (400 * 4 <= a && a < 400 * 5)
      mp["blue"]++;
    else if (400 * 5 <= a && a < 400 * 6)
      mp["yellow"]++;
    else if (400 * 6 <= a && a < 400 * 7)
      mp["orange"]++;
    else if (400 * 7 <= a && a < 400 * 8)
      mp["red"]++;
    else
      gold++;
  }
  cout << mp.size() << " ";
  cout << ((mp.size() + gold <= 8) ? mp.size() + gold : 8) << endl;
  return 0;
}
