#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000001;
const double PI = 3.141592653589;
const long long mod = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> a(7, 0);
  int k = 0;
  for (int i = 0; i < n; i++) {
    int A;
    cin >> A;
    if (A < 400)
      a[0]++;
    else if (A < 800)
      a[1]++;
    else if (A < 1600)
      a[2]++;
    else if (A < 2000)
      a[3]++;
    else if (A < 2400)
      a[4]++;
    else if (A < 2800)
      a[5]++;
    else if (A < 3200)
      a[6]++;
    else
      k++;
  }
  int c = 0;
  for (int i = 0; i < 7; i++) {
    if (a[i] != 0) c++;
  }
  cout << c << " ";
  int d = min(7, c + k);
  cout << d << endl;
  return 0;
}
