#include <bits/stdc++.h>
using namespace std;
int n, a[9], x, maxn, minn;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (x >= 3200) {
      a[1]++;
      a[2]++;
      a[3]++;
      a[4]++;
      a[5]++;
      a[6]++;
      a[7]++;
      a[8]++;
    }
    if (x >= 1 && x <= 399) a[1]++;
    if (x >= 400 && x <= 799) a[2]++;
    if (x >= 800 && x <= 1199) a[3]++;
    if (x >= 1200 && x <= 1599) a[4]++;
    if (x >= 1600 && x <= 1999) a[5]++;
    if (x >= 2000 && x <= 2399) a[6]++;
    if (x >= 2400 && x <= 2799) a[7]++;
    if (x >= 2800 && x <= 3199) a[8]++;
  }
  minn = a[1];
  maxn = a[1];
  for (int i = 2; i <= n; i++)
    if (a[i] > maxn) maxn = a[i];
  cout << maxn << " ";
  for (int i = 2; i <= n; i++)
    if (a[i] < minn) minn = a[i];
  cout << maxn;
  return 0;
}
