#include <bits/stdc++.h>
using namespace std;
map<int, int> MAP;
int main() {
  int a[10005];
  int n;
  while (cin >> n) {
    memset(a, 0, sizeof(a));
    int cou = 0, omg = 0;
    for (int i = 1; i <= n; i++) {
      int w;
      cin >> w;
      if (w <= 390)
        a[1]++;
      else if (w <= 799)
        a[2]++;
      else if (w <= 1199)
        a[3]++;
      else if (w <= 1599)
        a[4]++;
      else if (w <= 1999)
        a[5]++;
      else if (w <= 2399)
        a[6]++;
      else if (w <= 2799)
        a[7]++;
      else if (w <= 3199)
        a[8]++;
      else if (w <= 4800)
        a[9]++;
    }
    sort(a + 1, a + 1 + 8);
    for (int i = 1; i <= 8; i++) {
      if (a[i] != 0) cou++;
    }
    cout << cou << ' ';
    if (cou == 8)
      cout << '8' << endl;
    else
      cout << (cou + a[9]) % 8 << endl;
  }
  return 0;
}
