#include <bits/stdc++.h>
using namespace std;
void base() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  int n, x = 0, arr[100005], color[100005];
  memset(color, 0, sizeof color);
  cin >> n;
  for (int i = (int)0; i < (int)n; i++) {
    cin >> arr[i];
    if (arr[i] >= 1 && arr[i] <= 399) {
      color[0]++;
    } else if (arr[i] >= 400 && arr[i] < 800) {
      color[1]++;
    } else if (arr[i] >= 800 && arr[i] < 1200) {
      color[2]++;
    } else if (arr[i] >= 1200 && arr[i] < 1600) {
      color[3]++;
    } else if (arr[i] >= 1600 && arr[i] < 2000) {
      color[4]++;
    } else if (arr[i] >= 2000 && arr[i] < 2400) {
      color[5]++;
    } else if (arr[i] >= 2400 && arr[i] < 2800) {
      color[6]++;
    } else if (arr[i] >= 2800 && arr[i] < 3200) {
      color[7]++;
    } else
      color[8]++;
  }
  int mn = 0;
  for (int i = (int)0; i < (int)8; i++) {
    if (color[i]) mn++;
  }
  int mx = mn;
  if (color[8] > 0) mx = mn + min(7 - mn + 1, color[8]);
  cout << mn << " " << mx << endl;
  return 0;
}
