#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, c1, c2, c3, c4, c5, c6, c7, c8, a, c9;
  c1 = c2 = c3 = c4 = c5 = c6 = c7 = c8 = c9 = 0;
  cin >> n;
  while (n--) {
    cin >> a;
    if (c1 == 0 && a <= 399)
      c1++;
    else if (c2 == 0 && a > 399 && a <= 799)
      c2++;
    else if (c3 == 0 && a > 799 && a <= 1199)
      c3++;
    else if (c4 == 0 && a > 1199 && a <= 1599)
      c4++;
    else if (c5 == 0 && a > 1599 && a <= 1999)
      c5++;
    else if (c6 == 0 && a > 1999 && a <= 2399)
      c6++;
    else if (c7 == 0 && a > 2399 && a <= 2799)
      c7++;
    else if (c8 == 0 && a > 2799 && a <= 3199)
      c8++;
    else if (a >= 3200)
      c9++;
  }
  if (c1 == 0 && c2 == 0 && c3 == 0 && c4 == 0 && c5 == 0 && c6 == 0 &&
      c7 == 0 && c8 == 0 && c9 != 0)
    cout << 1 << " " << ((c9 > 8) ? 8 : c9);
  else
    cout << c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 << " "
         << ((c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9 > 8)
                 ? 8
                 : c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9);
  return 0;
}
