#include <bits/stdc++.h>
using namespace std;
int n, a[4800], ans, cnt;
set<string> rate;
int main(void) {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (1 <= a[i] && a[i] <= 399)
      rate.insert("gray");
    else if (400 <= a[i] && a[i] <= 799)
      rate.insert("brown");
    else if (800 <= a[i] && a[i] <= 1199)
      rate.insert("green");
    else if (1200 <= a[i] && a[i] <= 1599)
      rate.insert("lblue");
    else if (1600 <= a[i] && a[i] <= 1999)
      rate.insert("blue");
    else if (2000 <= a[i] && a[i] <= 2399)
      rate.insert("yellow");
    else if (2400 <= a[i] && a[i] <= 2799)
      rate.insert("orange");
    else if (2800 <= a[i] && a[i] <= 3199)
      rate.insert("red");
    else
      cnt++;
  }
  int min = (int)rate.size();
  int max = min + cnt;
  cout << min << " " << max << endl;
  return 0;
}
