#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1000000007;
int main(void) {
  int N;
  vector<int> a(110);
  cin >> N;
  for (int i = 0; i < N; i++) cin >> a[i];
  vector<int> gray, brown, green, cyan, blue, yellow, orange, red, any;
  for (int i = 0; i < N; i++) {
    if (a[i] < 400)
      gray.push_back(i);
    else if (a[i] < 800)
      brown.push_back(i);
    else if (a[i] < 1200)
      green.push_back(i);
    else if (a[i] < 1600)
      cyan.push_back(i);
    else if (a[i] < 2000)
      blue.push_back(i);
    else if (a[i] < 2400)
      yellow.push_back(i);
    else if (a[i] < 2800)
      orange.push_back(i);
    else if (a[i] < 3200)
      red.push_back(i);
    else
      any.push_back(i);
  }
  int X = 0, Y = 0;
  if (gray.size() > 0)
    X++;
  else
    Y++;
  if (brown.size() > 0)
    X++;
  else
    Y++;
  if (green.size() > 0)
    X++;
  else
    Y++;
  if (cyan.size() > 0)
    X++;
  else
    Y++;
  if (blue.size() > 0)
    X++;
  else
    Y++;
  if (yellow.size() > 0)
    X++;
  else
    Y++;
  if (orange.size() > 0)
    X++;
  else
    Y++;
  if (red.size() > 0)
    X++;
  else
    Y++;
  cout << X << " " << X + min((int)(any.size()), Y) << endl;
  return 0;
}
