#include <bits/stdc++.h>
const int MOD = 1000000007, INF = 1111111111;
using namespace std;
using lint = long long;
template <class T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
  for (int i = 0; i < (int)vec.size(); i++) {
    os << vec[i] << (i + 1 == vec.size() ? "" : " ");
  }
  return os;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  map<int, int> color;
  int f_color = 0;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    if (a / 400 < 8)
      color[a / 400]++;
    else
      f_color++;
  }
  cout << max((int)color.size(), f_color) << " ";
  cout << min(8, (int)color.size() + f_color) << "\n";
  return 0;
}
