#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a[10];
  int n;
  while (cin >> n && n != 0) {
    int max, min, i;
    for (i = 0; i < 10; ++i) a[i] = 0;
    for (i = 0; i < n; ++i) {
      int q;
      cin >> q;
      if (q <= 399)
        a[0]++;
      else if (q <= 799)
        a[1]++;
      else if (q <= 1199)
        a[2]++;
      else if (q <= 1599)
        a[3]++;
      else if (q <= 1999)
        a[4]++;
      else if (q <= 2399)
        a[5]++;
      else if (q <= 2799)
        a[6]++;
      else if (q <= 3199)
        a[7]++;
      else
        a[8]++;
    }
    int sum = 0;
    for (i = 0; i <= 7; ++i) {
      if (a[i] > 0) sum++;
    }
    min = sum;
    if (a[8] >= 8 - sum)
      max = 8;
    else
      max = sum + a[8];
    if (sum == 0) {
      min = 1;
      if (a[8] >= 8)
        max = 8;
      else
        max = a[8];
    }
    cout << min << " " << max << endl;
  }
  return 0;
}
