#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, ans = 0;
  int a[n];
  bool color[8] = {};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= 3200) count++;
    if (0 < a[i] && a[i] <= 399)
      color[0] = 1;
    else if (399 < a[i] && a[i] <= 799)
      color[1] = 1;
    else if (799 < a[i] && a[i] <= 1199)
      color[2] = 1;
    else if (1199 < a[i] && a[i] <= 1599)
      color[3] = 1;
    else if (1599 < a[i] && a[i] <= 1999)
      color[4] = 1;
    else if (1999 < a[i] && a[i] <= 2399)
      color[5] = 1;
    else if (2399 < a[i] && a[i] <= 2799)
      color[6] = 1;
    else if (2799 < a[i] && a[i] <= 3199)
      color[7] = 1;
  }
  for (int i = 0; i < 8; i++) {
    if (color[i] == 1) {
      ans++;
    }
  }
  cout << ans << " " << ans + count << endl;
  return 0;
}
