#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, grey = 0, brown = 0, green = 0, sky = 0, blue = 0, yellow = 0,
         orange = 0, red = 0, super = 0;
  int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int r;
    cin >> r;
    if (r <= 399)
      grey++;
    else if (400 <= r && r <= 799)
      brown++;
    else if (800 <= r && r <= 1199)
      green++;
    else if (1200 <= r && r <= 1599)
      sky++;
    else if (1600 <= r && r <= 1999)
      blue++;
    else if (2000 <= r && r <= 2399)
      yellow++;
    else if (2400 <= r && r <= 2799)
      orange++;
    else if (2800 <= r && r <= 3199)
      red++;
    else
      super++;
  }
  if (grey >= 1) a = 1;
  if (brown >= 1) b = 1;
  if (green >= 1) c = 1;
  if (sky >= 1) d = 1;
  if (blue >= 1) e = 1;
  if (yellow >= 1) f = 1;
  if (orange >= 1) g = 1;
  if (red >= 1) h = 1;
  cout << a + b + c + d + e + f + g + h << " "
       << a + b + c + d + e + f + g + h + super;
}
