#include <bits/stdc++.h>
using namespace std;
int gray, green, cyan, orange, yellow, brown, blue, red;
int main() {
  int n, mini = 0, maxi = 0, c = 0, pro = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int num;
    cin >> num;
    if (num >= 0 && num <= 399) gray++;
    if (num >= 400 && num <= 799) brown++;
    if (num >= 800 && num <= 1199) green++;
    if (num >= 1200 && num <= 1599) cyan++;
    if (num >= 1600 && num <= 1999) blue++;
    if (num >= 2000 && num <= 2399) yellow++;
    if (num >= 2400 && num <= 2799) orange++;
    if (num >= 2800 && num <= 3199) red++;
    if (num >= 3200) c++;
  }
  if (gray != 0)
    mini++;
  else
    pro++;
  if (brown != 0)
    mini++;
  else
    pro++;
  if (green != 0)
    mini++;
  else
    pro++;
  if (cyan != 0)
    mini++;
  else
    pro++;
  if (blue != 0)
    mini++;
  else
    pro++;
  if (yellow != 0)
    mini++;
  else
    pro++;
  if (red != 0)
    mini++;
  else
    pro++;
  if (orange != 0)
    mini++;
  else
    pro++;
  cout << mini << " " << mini + min(c, pro) << endl;
  return 0;
}
