#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<bool> col(8, false);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a < 400)
      col[0] = true;
    else if (400 <= a && a < 800)
      col[1] = true;
    else if (800 <= a && a < 1200)
      col[2] = true;
    else if (1200 <= a && a < 1600)
      col[3] = true;
    else if (1600 <= a && a < 2000)
      col[4] = true;
    else if (2000 <= a && a < 2400)
      col[5] = true;
    else if (2400 <= a && a < 2800)
      col[6] = true;
    else if (2800 <= a && a < 3200)
      col[7] = true;
    else if (3200 <= a)
      cnt++;
  }
  int res = 0;
  for (int i = 0; i < 8; i++)
    if (col[i]) res++;
  cout << res << " " << min(res + cnt, 8) << endl;
  return 0;
}
