#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a;
  int mx = 0;
  int vis[8] = {};
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a >= 3200)
      mx++;
    else if (a >= 1 && a <= 399)
      vis[0] = 1;
    else if (a >= 400 && a <= 799)
      vis[1] = 1;
    else if (a >= 800 && a <= 1199)
      vis[2] = 1;
    else if (a >= 1200 && a <= 1599)
      vis[3] = 1;
    else if (a >= 1600 && a <= 1999)
      vis[4] = 1;
    else if (a >= 2000 && a <= 2399)
      vis[5] = 1;
    else if (a >= 2400 && a <= 2799)
      vis[6] = 1;
    else if (a >= 2800 && a <= 3199)
      vis[7] = 1;
  }
  int mn = 0;
  for (int i = 0; i < 8; i++) mn += vis[i];
  cout << mn << ' ' << min(8, mn + mx);
  cout << endl;
  return 0;
}
