#include <bits/stdc++.h>
using namespace std;
int getint() {
  int n;
  scanf("%d", &n);
  return n;
}
vector<int> getints(int n) {
  vector<int> a(n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  return a;
}
template <class T>
bool ifinclude(vector<T> a, T x) {
  auto itr = find(a.begin(), a.end(), x);
  return distance(a.begin(), itr) != a.size();
}
int main(void) {
  int N = getint();
  int arr[7] = {};
  int red = 0;
  for (int i = 0; i < N; i++) {
    int x = getint();
    if (x < 3200) {
      if (x < 2800) {
        arr[x / 400] = 1;
      } else {
        arr[7] = 1;
      }
    }
    if (x >= 3200) {
      red += 1;
    }
  }
  int c = count(arr, arr + 8, 1);
  cout << max(c, 1) << " " << min(c + red, 8) << endl;
  return 0;
}
